mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Use new proc syntax instead Proc.new
This commit is contained in:
parent
1f7d52eb6e
commit
f545b53693
1 changed files with 6 additions and 6 deletions
|
@ -135,15 +135,15 @@ module Sidekiq
|
||||||
end
|
end
|
||||||
|
|
||||||
PROCTITLES = [
|
PROCTITLES = [
|
||||||
Proc.new { 'sidekiq'.freeze },
|
proc { 'sidekiq'.freeze },
|
||||||
Proc.new { Sidekiq::VERSION },
|
proc { Sidekiq::VERSION },
|
||||||
Proc.new { |mgr, data| data['tag'] },
|
proc { |mgr, data| data['tag'] },
|
||||||
Proc.new { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" },
|
proc { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" },
|
||||||
Proc.new { |mgr, data| "stopping" if mgr.stopped? },
|
proc { |mgr, data| "stopping" if mgr.stopped? },
|
||||||
]
|
]
|
||||||
|
|
||||||
def heartbeat(key, data, json)
|
def heartbeat(key, data, json)
|
||||||
results = PROCTITLES.map {|x| x.call(self, data) }
|
results = PROCTITLES.map {|x| x.(self, data) }
|
||||||
results.compact!
|
results.compact!
|
||||||
$0 = results.join(' ')
|
$0 = results.join(' ')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue