module Sidekiq::DynamicThrottle

Constants

VERSION

Public Class Methods

register_throttle(throttle, *queues) click to toggle source
# File lib/sidekiq-dynamic-throttle.rb, line 13
def self.register_throttle(throttle, *queues)
  queues.flatten!
  queues.each { |queue| throttles['queue:' + queue.to_s] << throttle }
end
throttles() click to toggle source
# File lib/sidekiq-dynamic-throttle.rb, line 9
def self.throttles
  @throttles ||= Hash.new { |hash, key| hash[key] = [] }
end