Class: Quebert::Backend::InProcess

Inherits:
Array
  • Object
show all
Defined in:
lib/quebert/backend/in_process.rb

Overview

Drops jobs on an array in-process.

Instance Method Summary collapse

Instance Method Details

#put(job, *args) ⇒ Object


5
6
7
# File 'lib/quebert/backend/in_process.rb', line 5

def put(job, *args)
  unshift job.to_json
end

#reserveObject


9
10
11
# File 'lib/quebert/backend/in_process.rb', line 9

def reserve
  json = pop and Controller::Base.new(Job.from_json(json))
end