Class: Airflow::Runner::WorkflowRunner

Inherits:
BaseRunner
  • Object
show all
Defined in:
lib/async_flow/runner.rb

Instance Method Summary collapse

Methods inherited from BaseRunner

#run, #stop

Methods included from Utils::Logger

#logger

Constructor Details

#initializeWorkflowRunner

Returns a new instance of WorkflowRunner.



109
110
111
112
# File 'lib/async_flow/runner.rb', line 109

def initialize(...)
  super
  poller.is_workflow_task = true
end

Instance Method Details

#definition(dto) ⇒ Object



114
115
116
117
118
119
120
121
122
# File 'lib/async_flow/runner.rb', line 114

def definition(dto)
  klass = definitions.find { |task| task._type == dto.workflow_name }
  unless klass
    raise Error,
          "Workflow definition #{dto.workflow_name} not registered. Available tasks #{definitions.map(&:_type)}"
  end

  klass.new(dto)
end