Class: PerfectSched::Task
- Inherits:
-
ScheduleWithMetadata
- Object
- Schedule
- ScheduleWithMetadata
- PerfectSched::Task
- Includes:
- Model
- Defined in:
- lib/perfectsched/task.rb
Instance Attribute Summary collapse
-
#scheduled_time ⇒ Object
readonly
Returns the value of attribute scheduled_time.
Attributes included from Model
Attributes included from ScheduleMetadataAccessors
Attributes inherited from Schedule
Instance Method Summary collapse
- #finish!(options = {}) ⇒ Object
-
#initialize(client, key, attributes, scheduled_time, task_token) ⇒ Task
constructor
A new instance of Task.
- #release!(options = {}) ⇒ Object
- #retry!(options = {}) ⇒ Object
Methods included from Model
Methods inherited from ScheduleWithMetadata
Methods included from ScheduleMetadataAccessors
#cron, #data, #delay, #message, #next_run_time, #next_time, #timezone, #type
Methods inherited from Schedule
#delete!, #exists?, #inspect, #metadata
Constructor Details
#initialize(client, key, attributes, scheduled_time, task_token) ⇒ Task
Returns a new instance of Task.
24 25 26 27 28 |
# File 'lib/perfectsched/task.rb', line 24 def initialize(client, key, attributes, scheduled_time, task_token) super(client, key, attributes) @scheduled_time = scheduled_time @task_token = task_token end |
Instance Attribute Details
#scheduled_time ⇒ Object (readonly)
Returns the value of attribute scheduled_time.
30 31 32 |
# File 'lib/perfectsched/task.rb', line 30 def scheduled_time @scheduled_time end |
Instance Method Details
#finish!(options = {}) ⇒ Object
40 41 42 |
# File 'lib/perfectsched/task.rb', line 40 def finish!(={}) @client.finish(@task_token, ) end |
#release!(options = {}) ⇒ Object
32 33 34 |
# File 'lib/perfectsched/task.rb', line 32 def release!(={}) @client.release(@task_token, ) end |
#retry!(options = {}) ⇒ Object
36 37 38 |
# File 'lib/perfectsched/task.rb', line 36 def retry!(={}) @client.retry(@task_token, ) end |