diff --git a/lib/sidekiq/launcher.rb b/lib/sidekiq/launcher.rb index d947dadb..a9825e62 100644 --- a/lib/sidekiq/launcher.rb +++ b/lib/sidekiq/launcher.rb @@ -37,7 +37,7 @@ module Sidekiq manager.async.start poller.async.poll(true) - start_heartbeat(@options[:tag] ? "#{@options[:tag]} " : '') + start_heartbeat end end @@ -60,13 +60,13 @@ module Sidekiq private - def start_heartbeat(tag) + def start_heartbeat key = identity data = { 'hostname' => hostname, 'started_at' => Time.now.to_f, 'pid' => $$, - 'tag' => tag.strip, + 'tag' => @options[:tag] || '', 'concurrency' => @options[:concurrency], 'queues' => @options[:queues].uniq, } diff --git a/lib/sidekiq/manager.rb b/lib/sidekiq/manager.rb index 703c7643..d1b9bfb3 100644 --- a/lib/sidekiq/manager.rb +++ b/lib/sidekiq/manager.rb @@ -136,7 +136,7 @@ module Sidekiq return if stopped? $0 = "sidekiq #{Sidekiq::VERSION} #{data['tag']}[#{@busy.size} of #{data['concurrency']} busy]#{stopped? ? ' stopping' : ''}" - ❤(key, data) + ❤(key) after(5) do heartbeat(key, data) end @@ -144,7 +144,7 @@ module Sidekiq private - def ❤(key, data) + def ❤(key) begin Sidekiq.redis do |conn| conn.multi do