Class: Airflow::Runner::WorkflowRunner
- Inherits:
-
BaseRunner
- Object
- BaseRunner
- Airflow::Runner::WorkflowRunner
- Defined in:
- lib/async_flow/runner.rb
Instance Method Summary collapse
- #definition(dto) ⇒ Object
-
#initialize ⇒ WorkflowRunner
constructor
A new instance of WorkflowRunner.
Methods inherited from BaseRunner
Methods included from Utils::Logger
Constructor Details
#initialize ⇒ WorkflowRunner
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 |