Class: Proxy::Dynflow::Action::SingleRunnerBatch
- Inherits:
-
Batch
- Object
- Dynflow::Action
- Batch
- Proxy::Dynflow::Action::SingleRunnerBatch
show all
- Includes:
- Dynflow::Action::WithPollingSubPlans
- Defined in:
- lib/smart_proxy_dynflow/action/single_runner_batch.rb
Instance Method Summary
collapse
Methods inherited from Batch
#create_sub_plans, #notify_on_finish, #rescue_strategy
Instance Method Details
#check_for_errors!(optional = true) ⇒ Object
12
13
14
|
# File 'lib/smart_proxy_dynflow/action/single_runner_batch.rb', line 12
def check_for_errors!(optional = true)
super unless optional
end
|
#finalize ⇒ Object
22
23
24
25
|
# File 'lib/smart_proxy_dynflow/action/single_runner_batch.rb', line 22
def finalize
output.delete(:results)
check_for_errors!
end
|
#on_finish ⇒ Object
16
17
18
19
20
|
# File 'lib/smart_proxy_dynflow/action/single_runner_batch.rb', line 16
def on_finish
output[:results] = sub_plans.map(&:entry_action).reduce({}) do |acc, cur|
acc.merge(cur.execution_plan_id => cur.output)
end
end
|
#plan(launcher, input_hash) ⇒ Object
7
8
9
10
|
# File 'lib/smart_proxy_dynflow/action/single_runner_batch.rb', line 7
def plan(launcher, input_hash)
results = super
plan_action BatchCallback, input_hash, results.output[:results]
end
|
#rescue_strategy_for_self ⇒ Object
27
28
29
|
# File 'lib/smart_proxy_dynflow/action/single_runner_batch.rb', line 27
def rescue_strategy_for_self
Dynflow::Action::Rescue::Skip
end
|