Skip to content

Commit

Permalink
Use new proc syntax instead Proc.new
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovanton committed Jun 9, 2015
1 parent 1f7d52e commit f545b53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/sidekiq/manager.rb
Expand Up @@ -135,15 +135,15 @@ def real_thread(proxy_id, thr)
end

PROCTITLES = [
Proc.new { 'sidekiq'.freeze },
Proc.new { Sidekiq::VERSION },
Proc.new { |mgr, data| data['tag'] },
Proc.new { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" },
Proc.new { |mgr, data| "stopping" if mgr.stopped? },
proc { 'sidekiq'.freeze },
proc { Sidekiq::VERSION },
proc { |mgr, data| data['tag'] },
proc { |mgr, data| "[#{mgr.busy.size} of #{data['concurrency']} busy]" },
proc { |mgr, data| "stopping" if mgr.stopped? },
]

def heartbeat(key, data, json)
results = PROCTITLES.map {|x| x.call(self, data) }
results = PROCTITLES.map {|x| x.(self, data) }
results.compact!
$0 = results.join(' ')

Expand Down

0 comments on commit f545b53

Please sign in to comment.