Class: Proxy::Dynflow::TaskLauncher::Batch
- Inherits:
-
Abstract
- Object
- Abstract
- Proxy::Dynflow::TaskLauncher::Batch
show all
- Defined in:
- lib/smart_proxy_dynflow/task_launcher/batch.rb
Instance Attribute Summary
Attributes inherited from Abstract
#callback, #options, #results, #world
Instance Method Summary
collapse
Methods inherited from Abstract
#initialize, input_format, new_from_hash, #to_hash
Instance Method Details
#child_launcher(parent) ⇒ Object
22
23
24
|
# File 'lib/smart_proxy_dynflow/task_launcher/batch.rb', line 22
def child_launcher(parent)
Single.new(world, callback, :parent => parent)
end
|
#launch!(input) ⇒ Object
4
5
6
7
|
# File 'lib/smart_proxy_dynflow/task_launcher/batch.rb', line 4
def launch!(input)
plan = trigger(nil, action_class, self, input)
results[:parent] = format_result(plan)
end
|
#launch_children(parent, input_hash) ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/smart_proxy_dynflow/task_launcher/batch.rb', line 9
def launch_children(parent, input_hash)
input_hash.map do |task_id, input|
launcher = child_launcher(parent)
triggered = launcher.launch!(transform_input(input), id: task_id)
results[task_id] = launcher.results
triggered
end
end
|
#prepare_batch(input_hash) ⇒ Object
18
19
20
|
# File 'lib/smart_proxy_dynflow/task_launcher/batch.rb', line 18
def prepare_batch(input_hash)
input_hash
end
|