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

Fix spacing issue with proctitle

This commit is contained in:
Mike Perham 2014-03-31 09:32:54 -07:00
parent 8c4efe4b68
commit 580f6fcbec

View file

@ -135,7 +135,11 @@ module Sidekiq
def heartbeat(key, data)
return if stopped?
$0 = "sidekiq #{Sidekiq::VERSION} #{data['tag']}[#{@busy.size} of #{data['concurrency']} busy]#{stopped? ? ' stopping' : ''}"
proctitle = ['sidekiq', Sidekiq::VERSION]
proctitle << data['tag'] unless data['tag'].empty?
proctitle << "[#{@busy.size} of #{data['concurrency']} busy]"
proctitle << 'stopping' if stopped?
$0 = proctitle.join(' ')
(key)
after(5) do
heartbeat(key, data)