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

#prepare_batch

Methods inherited from Abstract

#initialize, input_format

Constructor Details

This class inherits a constructor from Proxy::Dynflow::TaskLauncher::Abstract

Class Method Details

.runner_classObject

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 6

def self.runner_class
  raise NotImplementedError
end

Instance Method Details

#launch!(input) ⇒ Object



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

def launch!(input)
  trigger(nil, Action::SingleRunnerBatch, self, input)
end

#launch_children(parent, input_hash) ⇒ Object



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

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

#operationObject

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 19

def operation
  raise NotImplementedError
end

#runner_input(input) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/smart_proxy_dynflow/task_launcher/group.rb', line 23

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