Class: Proxy::Dynflow::TaskLauncher::AbstractGroup

Inherits:
Batch
  • Object
show all
Defined in:
lib/smart_proxy_dynflow/task_launcher/group.rb

Instance Attribute Summary

Attributes inherited from Abstract

#callback, #options, #results, #world

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Batch

#launch!, #prepare_batch

Methods inherited from Abstract

input_format, #launch!, new_from_hash, #to_hash

Constructor Details

#initialize(*args) ⇒ AbstractGroup

Returns a new instance of AbstractGroup.



8
9
10
11
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 8

def initialize(*args)
  super
  @runner_id = SecureRandom.uuid
end

Class Method Details

.runner_classObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 13

def self.runner_class
  raise NotImplementedError
end

Instance Method Details

#action_classObject



17
18
19
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 17

def action_class
  Action::SingleRunnerBatch
end

#launch_children(parent, input_hash) ⇒ Object



21
22
23
24
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 21

def launch_children(parent, input_hash)
  super(parent, input_hash)
  trigger(parent, Action::BatchRunner, self, input_hash, @runner_id)
end

#operationObject

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 26

def operation
  raise NotImplementedError
end

#runner_input(input) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 30

def runner_input(input)
  input.reduce({}) do |acc, (id, input)|
    input = { :execution_plan_id => results[id][:task_id],
              :run_step_id => 2,
              :input => input }
    acc.merge(id => input)
  end
end