Sha256: e09e5e7177f145c24fb0eff4e7e593f22624dbf4d7f1a7284b779006744b8e16

Contents?: true

Size: 488 Bytes

Versions: 7

Compression:

Stored size: 488 Bytes

Contents

module Sidekiq
  class LimitFetch::UnitOfWork < BasicFetch::UnitOfWork
    def initialize(queue, job)
      super
      redis_retryable { Queue[queue_name].increase_busy }
    end

    def acknowledge
      redis_retryable { Queue[queue_name].decrease_busy }
      redis_retryable { Queue[queue_name].release }
    end

    def requeue
      super
      acknowledge
    end

    private

    def redis_retryable(&block)
      Sidekiq::LimitFetch.redis_retryable(&block)
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
sidekiq-limit_fetch-4.2.0 lib/sidekiq/limit_fetch/unit_of_work.rb
sidekiq-limit_fetch-4.1.0 lib/sidekiq/limit_fetch/unit_of_work.rb
sidekiq-limit_fetch-4.0.0 lib/sidekiq/limit_fetch/unit_of_work.rb
rcgt-sidekiq-limit_fetch-3.4.1 lib/sidekiq/limit_fetch/unit_of_work.rb
sidekiq-limit_fetch-3.4.0 lib/sidekiq/limit_fetch/unit_of_work.rb
sidekiq-limit_fetch-3.3.1 lib/sidekiq/limit_fetch/unit_of_work.rb
sidekiq-limit_fetch-3.3.0 lib/sidekiq/limit_fetch/unit_of_work.rb