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

rework leader api change to avoid breaking processset#to_a

This commit is contained in:
Mike Perham 2017-05-26 10:35:19 -07:00
parent 79f452c68d
commit d7d810cc1a
2 changed files with 4 additions and 3 deletions

View file

@ -731,7 +731,7 @@ module Sidekiq
next if info.nil?
hash = Sidekiq.load_json(info)
yield Process.new(hash.merge('busy' => busy.to_i, 'beat' => at_s.to_f, 'quiet' => quiet)), leader
yield Process.new(hash.merge('busy' => busy.to_i, 'beat' => at_s.to_f, 'quiet' => quiet))
end
end

View file

@ -22,7 +22,8 @@
<th><%= t('Busy') %></th>
<th>&nbsp;</th>
</thead>
<% processes.each do |process,leader| %>
<% lead = processes.leader %>
<% processes.each do |process| %>
<tr>
<td class="box">
<%= "#{process['hostname']}:#{process['pid']}" %>
@ -33,7 +34,7 @@
<% if process.stopping? %>
<span class="label label-danger">quiet</span>
<% end %>
<% if process.identity == leader %>
<% if process.identity == lead %>
<span class="label label-warning">leader</span>
<% end %>
<br>