Class: Taski::Execution::TaskObserver

Inherits:
Object
  • Object
show all
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

Progress::Layout::Base

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject

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_readyObject



22
23
# File 'lib/taski/execution/task_observer.rb', line 22

def on_ready
end

#on_startObject



25
26
# File 'lib/taski/execution/task_observer.rb', line 25

def on_start
end

#on_stopObject



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