From 934f91cd2c599d2291b007768361045ec968cfc7 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Sun, 1 Dec 2013 12:38:49 -0800 Subject: [PATCH] Early exit for noop requeue --- lib/sidekiq/fetch.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/sidekiq/fetch.rb b/lib/sidekiq/fetch.rb index 7da2a976..4ac9fcd8 100644 --- a/lib/sidekiq/fetch.rb +++ b/lib/sidekiq/fetch.rb @@ -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|