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

Early exit for noop requeue

This commit is contained in:
Mike Perham 2013-12-01 12:38:49 -08:00
parent eb438ae66e
commit 934f91cd2c

View file

@ -93,6 +93,8 @@ module Sidekiq
# By leaving this as a class method, it can be pluggable and used by the Manager actor. Making it
# an instance method will make it async to the Fetcher actor
def self.bulk_requeue(inprogress, options)
return if inprogress.empty?
Sidekiq.logger.debug { "Re-queueing terminated jobs" }
jobs_to_requeue = {}
inprogress.each do |unit_of_work|