diff --git a/lib/sidekiq/throttled/patches/basic_fetch.rb b/lib/sidekiq/throttled/patches/basic_fetch.rb index 53ef9e90..5acb3971 100644 --- a/lib/sidekiq/throttled/patches/basic_fetch.rb +++ b/lib/sidekiq/throttled/patches/basic_fetch.rb @@ -32,7 +32,10 @@ def requeue_throttled(work) # @param [Array] queues # @return [Array] def queues_cmd - super - (Throttled.cooldown&.queues || []) + throttled_queues = Throttled.cooldown&.queues + return super unless throttled_queues&.size&.positive? + + super - throttled_queues end end end