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

Handle whitespace

This commit is contained in:
Mike Perham 2015-06-09 13:18:56 -07:00
parent 1c706637e8
commit 7441f6e51e
2 changed files with 6 additions and 2 deletions

View file

@ -143,7 +143,9 @@ module Sidekiq
]
def heartbeat(key, data, json)
$0 = PROCTITLES.map {|x| x.call(self, data) }.join(' ')
results = PROCTITLES.map {|x| x.call(self, data) }
results.compact!
$0 = results.join(' ')
(key, json)
after(5) do

View file

@ -110,11 +110,13 @@ class TestManager < Sidekiq::Test
describe 'when manager is active' do
before do
Sidekiq::Manager::PROCTITLES << Proc.new { "xyz" }
@mgr.heartbeat('identity', heartbeat_data, Sidekiq.dump_json(heartbeat_data))
Sidekiq::Manager::PROCTITLES.pop
end
it 'sets useful info to proctitle' do
assert_equal "sidekiq #{Sidekiq::VERSION} myapp [1 of 3 busy] ", $0
assert_equal "sidekiq #{Sidekiq::VERSION} myapp [1 of 3 busy] xyz", $0
end
it 'stores process info in redis' do