Class: Delayed::WorkQueue::InProcess

Inherits:
Object
  • Object
show all
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

Instance Method Details

#closeObject

intentional nops for compatibility w/ parent process


19
# File 'lib/delayed/work_queue/in_process.rb', line 19

def close; end

#get_and_lock_next_available(worker_name, worker_config) ⇒ Object


8
9
10
11
12
13
14
15
16
# 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

#wake_upObject


20
# File 'lib/delayed/work_queue/in_process.rb', line 20

def wake_up; end