Skip to content

Commit

Permalink
Don't loop indefinitely
Browse files Browse the repository at this point in the history
Close #515
  • Loading branch information
mhenrixon committed Jun 11, 2020
1 parent 14318e6 commit 7fd1927
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sidekiq_unique_jobs/orphans/ruby_reaper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def entries(conn, queue) # rubocop:disable Metrics/MethodLength
entries = conn.lrange(queue_key, range_start, range_end)
page += 1

break if entries.empty?

entries.each do |entry|
yield entry
end
Expand Down

0 comments on commit 7fd1927

Please sign in to comment.