Class: Delayed::WorkQueue::InProcess
- Inherits:
-
Object
- Object
- Delayed::WorkQueue::InProcess
- Defined in:
- lib/delayed/work_queue/in_process.rb
Overview
The simplest possible implementation of a WorkQueue – just turns around and queries the queue inline.
Instance Method Summary collapse
- #close ⇒ Object
- #get_and_lock_next_available(worker_name, worker_config) ⇒ Object
-
#init ⇒ Object
intentional nops for compatibility w/ parent process.
- #wake_up ⇒ Object
Instance Method Details
#close ⇒ Object
22 |
# File 'lib/delayed/work_queue/in_process.rb', line 22 def close; end |
#get_and_lock_next_available(worker_name, worker_config) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/delayed/work_queue/in_process.rb', line 8 def get_and_lock_next_available(worker_name, worker_config) Delayed::Worker.lifecycle.run_callbacks(:work_queue_pop, self, worker_config) do Delayed::Job.get_and_lock_next_available( worker_name, worker_config[:queue], worker_config[:min_priority], worker_config[:max_priority] ) end end |
#init ⇒ Object
intentional nops for compatibility w/ parent process
20 |
# File 'lib/delayed/work_queue/in_process.rb', line 20 def init; end |
#wake_up ⇒ Object
24 |
# File 'lib/delayed/work_queue/in_process.rb', line 24 def wake_up; end |