Sha256: 9bbf481a4e3071cd2b377d5fc59f82102386444ecbd1c68a0d09d4753edbed94

Contents?: true

Size: 412 Bytes

Versions: 4

Compression:

Stored size: 412 Bytes

Contents

module Sidekiq
  class Queue
    extend LimitFetch::Singleton, Forwardable

    def_delegators :lock,
      :limit,   :limit=,
      :acquire, :release,
      :pause,   :unpause,
      :block,   :unblock,
      :paused?, :blocking?,
      :busy

    def lock
      @lock ||= mode::Semaphore.new name
    end

    def mode
      Sidekiq.options[:global] ? LimitFetch::Global : LimitFetch::Local
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sidekiq-limit_fetch-1.1 lib/sidekiq/extensions/queue.rb
sidekiq-limit_fetch-1.0 lib/sidekiq/extensions/queue.rb
sidekiq-limit_fetch-0.9 lib/sidekiq/extensions/queue.rb
sidekiq-limit_fetch-0.8 lib/sidekiq/extensions/queue.rb