Sha256: ef3ec3ffe6d42221f10f1646c0a8049a32d57fb375dd2519496dd2d8bc6500ab

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

module Sidekiq
  class Queue
    extend LimitFetch::Singleton, Forwardable

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sidekiq-limit_fetch-1.6 lib/sidekiq/extensions/queue.rb
sidekiq-limit_fetch-1.5 lib/sidekiq/extensions/queue.rb