Sha256: 5775c15bfa18c7f98b9be088d44aff18f9dfecef4f2858084f4b2f572df4793a

Contents?: true

Size: 412 Bytes

Versions: 17

Compression:

Stored size: 412 Bytes

Contents

# frozen_string_literal: true

module Sidekiq
  module Throttled
    class Strategy
      module Base
        def limit(job_args = nil)
          @limit.respond_to?(:call) ? @limit.call(*job_args) : @limit
        end

        private

        def key(job_args)
          key = @base_key.dup
          key << ":#{@key_suffix.call(*job_args)}" if @key_suffix
          key
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
sidekiq-throttled-0.15.1 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.16.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.15.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.14.1 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.13.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.12.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.11.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.10.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.10.0.beta lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.10.0.alpha lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.9.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.8.2 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.8.1 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.8.0 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.7.3 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.7.2 lib/sidekiq/throttled/strategy/base.rb
sidekiq-throttled-0.7.1 lib/sidekiq/throttled/strategy/base.rb