Sha256: 11c1c6f90984fe120886c85a3992e98a256ebe2aaa7ea1a62dc2ab865e361135

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

require 'celluloid'
require 'sidekiq/fetch'

require 'sidekiq-dynamic-throttle/version'
require 'sidekiq-dynamic-throttle/fetch'
require 'sidekiq-dynamic-throttle/throttler'

module Sidekiq::DynamicThrottle
  def self.throttles
    @throttles ||= Hash.new { |hash, key| hash[key] = [] }
  end

  def self.register_throttle(throttle, *queues)
    queues.flatten!
    queues.each { |queue| throttles['queue:' + queue.to_s] << throttle }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-dynamic-throttle-0.1.2 lib/sidekiq-dynamic-throttle.rb
sidekiq-dynamic-throttle-0.1.1 lib/sidekiq-dynamic-throttle.rb