Class: Delayed::Backend::Undelayed::Job
- Inherits:
-
Object
- Object
- Delayed::Backend::Undelayed::Job
- Includes:
- Base
- Defined in:
- lib/delayed/backend/undelayed.rb
Instance Attribute Summary collapse
-
#payload_object ⇒ Object
Returns the value of attribute payload_object.
Class Method Summary collapse
- .create(args) ⇒ Object
- .find_available(worker_name, limit = 5, max_run_time = Worker.max_run_time) ⇒ Object
Instance Method Summary collapse
-
#initialize(payload_object) ⇒ Job
constructor
A new instance of Job.
Constructor Details
#initialize(payload_object) ⇒ Job
Returns a new instance of Job.
7 8 9 |
# File 'lib/delayed/backend/undelayed.rb', line 7 def initialize(payload_object) self.payload_object = payload_object end |
Instance Attribute Details
#payload_object ⇒ Object
Returns the value of attribute payload_object.
6 7 8 |
# File 'lib/delayed/backend/undelayed.rb', line 6 def payload_object @payload_object end |
Class Method Details
.create(args) ⇒ Object
10 11 12 13 14 |
# File 'lib/delayed/backend/undelayed.rb', line 10 def self.create(args) job = self.new(args[:payload_object]) job.invoke_job job end |
.find_available(worker_name, limit = 5, max_run_time = Worker.max_run_time) ⇒ Object
15 16 17 |
# File 'lib/delayed/backend/undelayed.rb', line 15 def self.find_available(worker_name, limit = 5, max_run_time = Worker.max_run_time) [] end |