Class: Taski::Execution::TaskObserver
- Inherits:
-
Object
- Object
- Taski::Execution::TaskObserver
- Defined in:
- lib/taski/execution/task_observer.rb
Overview
Base class for observers of the execution lifecycle. Subclasses override only the events they care about.
All events are defined as no-op methods. The context accessor
is auto-injected by ExecutionFacade#add_observer.
Event Methods
- on_ready — facade is configured, observer can pull from context
- on_start — execution is about to begin
- on_stop — execution has finished
- on_task_updated(task_class, previous_state:, current_state:, phase:, timestamp:)
- on_group_started(task_class, group_name, phase:, timestamp:)
- on_group_completed(task_class, group_name, phase:, timestamp:)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
Instance Method Summary collapse
- #on_group_completed(task_class, group_name, phase:, timestamp:) ⇒ Object
- #on_group_started(task_class, group_name, phase:, timestamp:) ⇒ Object
- #on_ready ⇒ Object
- #on_start ⇒ Object
- #on_stop ⇒ Object
- #on_task_updated(task_class, previous_state:, current_state:, phase:, timestamp:) ⇒ Object
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
20 21 22 |
# File 'lib/taski/execution/task_observer.rb', line 20 def context @context end |
Instance Method Details
#on_group_completed(task_class, group_name, phase:, timestamp:) ⇒ Object
37 38 |
# File 'lib/taski/execution/task_observer.rb', line 37 def on_group_completed(task_class, group_name, phase:, timestamp:) end |
#on_group_started(task_class, group_name, phase:, timestamp:) ⇒ Object
34 35 |
# File 'lib/taski/execution/task_observer.rb', line 34 def on_group_started(task_class, group_name, phase:, timestamp:) end |
#on_ready ⇒ Object
22 23 |
# File 'lib/taski/execution/task_observer.rb', line 22 def on_ready end |
#on_start ⇒ Object
25 26 |
# File 'lib/taski/execution/task_observer.rb', line 25 def on_start end |
#on_stop ⇒ Object
28 29 |
# File 'lib/taski/execution/task_observer.rb', line 28 def on_stop end |
#on_task_updated(task_class, previous_state:, current_state:, phase:, timestamp:) ⇒ Object
31 32 |
# File 'lib/taski/execution/task_observer.rb', line 31 def on_task_updated(task_class, previous_state:, current_state:, phase:, timestamp:) end |