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

Merge pull request #3152 from alphagov/fix-testing-with-overridden-queue

Prevent an infinite loop when the job queue is not the worker default
This commit is contained in:
Mike Perham 2016-09-20 07:26:29 -07:00 committed by GitHub
commit 32e3d853b7

View file

@ -264,7 +264,7 @@ module Sidekiq
def drain
while jobs.any?
next_job = jobs.first
Queues.delete_for(next_job["jid"], queue, self.to_s)
Queues.delete_for(next_job["jid"], next_job["queue"], self.to_s)
process_job(next_job)
end
end