Skip to content

Commit

Permalink
Remove unnecessary each_with_index
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelga committed Jan 16, 2015
1 parent 33ca82f commit cf77959
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sidekiq/api.rb
Expand Up @@ -586,7 +586,7 @@ def each(&block)
end
end

result.each_with_index do |(info, busy, at_s), i|
result.each do |info, busy, at_s|
hash = Sidekiq.load_json(info)
yield Process.new(hash.merge('busy' => busy.to_i, 'beat' => at_s.to_f))
end
Expand Down
2 changes: 1 addition & 1 deletion web/views/busy.erb
Expand Up @@ -65,7 +65,7 @@
<th><%= t('Arguments') %></th>
<th><%= t('Started') %></th>
</thead>
<% workers.each_with_index do |(process, thread, msg), index| %>
<% workers.each do |process, thread, msg| %>
<% job = Sidekiq::Job.new(msg['payload']) %>
<tr>
<td><%= process %></td>
Expand Down

0 comments on commit cf77959

Please sign in to comment.