Class: Sidekiq::LimitFetch::UnitOfWork
- Inherits:
-
BasicFetch::UnitOfWork
- Object
- BasicFetch::UnitOfWork
- Sidekiq::LimitFetch::UnitOfWork
- Defined in:
- lib/sidekiq/limit_fetch/unit_of_work.rb
Instance Method Summary collapse
- #acknowledge ⇒ Object
-
#initialize(queue, job) ⇒ UnitOfWork
constructor
A new instance of UnitOfWork.
- #requeue ⇒ Object
Constructor Details
#initialize(queue, job) ⇒ UnitOfWork
Returns a new instance of UnitOfWork.
6 7 8 9 10 11 12 13 |
# File 'lib/sidekiq/limit_fetch/unit_of_work.rb', line 6 def initialize(queue, job) if post_6_5? super(queue, job, Sidekiq) else super end redis_retryable { Queue[queue_name].increase_busy } end |
Instance Method Details
#acknowledge ⇒ Object
15 16 17 18 |
# File 'lib/sidekiq/limit_fetch/unit_of_work.rb', line 15 def acknowledge redis_retryable { Queue[queue_name].decrease_busy } redis_retryable { Queue[queue_name].release } end |
#requeue ⇒ Object
20 21 22 23 |
# File 'lib/sidekiq/limit_fetch/unit_of_work.rb', line 20 def requeue super acknowledge end |