1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Merge pull request #1587 from mperham/feature/remove-unnecessary-variable

Minor code update to not pass around variables that aren't necessary to pass around.
This commit is contained in:
Mike Perham 2014-03-21 20:58:34 -07:00
commit 03cee866ee
2 changed files with 5 additions and 5 deletions

View file

@ -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,
}

View file

@ -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