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



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

#initObject

intentional nops for compatibility w/ parent process



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

def init; end

#wake_upObject



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

def wake_up; end