Class: Zenaton::Tasks::Wait
- Inherits:
-
Interfaces::Task
- Object
- Interfaces::Job
- Interfaces::Task
- Zenaton::Tasks::Wait
- Defined in:
- lib/zenaton/tasks/wait.rb
Overview
Class for creating waiting tasks
Constant Summary
Constants included from Zenaton::Traits::WithTimestamp
Zenaton::Traits::WithTimestamp::MODE_AT, Zenaton::Traits::WithTimestamp::MODE_MONTH_DAY, Zenaton::Traits::WithTimestamp::MODE_TIMESTAMP, Zenaton::Traits::WithTimestamp::MODE_WEEK_DAY, Zenaton::Traits::WithTimestamp::WEEKDAYS
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
Instance Method Summary collapse
-
#handle ⇒ Object
NOOP: No waiting when executing locally.
-
#initialize(event = nil) ⇒ Wait
constructor
Creates a new wait task and validates the event given.
Methods included from Zenaton::Traits::Zenatonable
#dispatch, #execute, #schedule
Methods included from Zenaton::Traits::WithTimestamp
Methods included from Zenaton::Traits::WithDuration
Methods inherited from Interfaces::Task
#context, #on_error_retry_delay
Constructor Details
#initialize(event = nil) ⇒ Wait
Creates a new wait task and validates the event given
21 22 23 24 |
# File 'lib/zenaton/tasks/wait.rb', line 21 def initialize(event = nil) raise ExternalError, error unless valid_param(event) @event = event end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
14 15 16 |
# File 'lib/zenaton/tasks/wait.rb', line 14 def event @event end |
Instance Method Details
#handle ⇒ Object
NOOP: No waiting when executing locally
27 |
# File 'lib/zenaton/tasks/wait.rb', line 27 def handle; end |