Class: Textus::Workflow::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/textus/workflow/runner.rb

Constant Summary collapse

DEFAULT_TIMEOUT =
30

Instance Method Summary collapse

Constructor Details

#initialize(definition, container:, call:) ⇒ Runner

Returns a new instance of Runner.



8
9
10
11
12
# File 'lib/textus/workflow/runner.rb', line 8

def initialize(definition, container:, call:)
  @definition = definition
  @container  = container
  @call       = call
end

Instance Method Details

#run(key) ⇒ Object



14
15
16
17
18
19
# File 'lib/textus/workflow/runner.rb', line 14

def run(key)
  ctx  = build_context(key)
  data = execute_steps(ctx)
  publish(key, data, ctx)
  data
end