class ForemanTasksCore::SingleRunnerBatchAction
Public Instance Methods
check_for_errors!(optional = true)
click to toggle source
Calls superclass method
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 20 def check_for_errors!(optional = true) super unless optional end
finalize()
click to toggle source
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 30 def finalize output.delete(:results) check_for_errors! end
initiate()
click to toggle source
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 15 def initiate ping suspended_action wait_for_sub_plans sub_plans end
on_finish()
click to toggle source
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 24 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)
click to toggle source
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 3 def plan(launcher, input_hash) launcher.launch_children(self, input_hash) sequence do results = plan_self plan_action BatchCallback, launcher.prepare_batch(input_hash), results.output[:results] end end
rescue_strategy_for_self()
click to toggle source
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 35 def rescue_strategy_for_self Dynflow::Action::Rescue::Skip end
run(event = nil)
click to toggle source
Calls superclass method
# File lib/foreman_tasks_core/single_runner_batch_action.rb, line 11 def run(event = nil) super unless event == Dynflow::Action::Skip end