Class: Conductor::Worker::Events::TaskRunnerEvent

Inherits:
ConductorEvent show all
Defined in:
lib/conductor/worker/events/conductor_event.rb

Overview

Base class for task runner events All events related to task polling and execution inherit from this

Instance Attribute Summary collapse

Attributes inherited from ConductorEvent

#timestamp

Instance Method Summary collapse

Constructor Details

#initialize(task_type:) ⇒ TaskRunnerEvent

Returns a new instance of TaskRunnerEvent.

Parameters:

  • task_type (String)

    Task definition name



29
30
31
32
# File 'lib/conductor/worker/events/conductor_event.rb', line 29

def initialize(task_type:)
  super()
  @task_type = task_type
end

Instance Attribute Details

#task_typeString (readonly)

Returns The task type/definition name.

Returns:

  • (String)

    The task type/definition name



26
27
28
# File 'lib/conductor/worker/events/conductor_event.rb', line 26

def task_type
  @task_type
end

Instance Method Details

#to_hObject



34
35
36
# File 'lib/conductor/worker/events/conductor_event.rb', line 34

def to_h
  super.merge(task_type: @task_type)
end