module Sidekiq::Throttled::Patches::SuperFetch
Public Class Methods
Source
# File lib/sidekiq/throttled/patches/super_fetch.rb, line 11 def self.prepended(base) base.prepend(ThrottledRetriever) end
Private Instance Methods
Source
# File lib/sidekiq/throttled/patches/super_fetch.rb, line 21 def active_queues # Create a hash of throttled queues for fast lookup throttled_queues = Throttled.cooldown&.queues&.to_h { |queue| [queue, true] } return super if throttled_queues.nil? || throttled_queues.empty? # Reject throttled queues from the list of active queues super.reject { |queue, _private_queue| throttled_queues[queue] } end
Returns list of non-paused queues to try to fetch jobs from.
@note It may return an empty array. @return [Array<Array(String, String)>]
Calls superclass method