class ForemanTasksCore::TaskLauncher::AbstractGroup

Public Class Methods

runner_class() click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 6
def self.runner_class
  raise NotImplementedError
end

Public Instance Methods

launch!(input) click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 10
def launch!(input)
  trigger(nil, SingleRunnerBatchAction, self, input)
end
launch_children(parent, input_hash) click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 14
def launch_children(parent, input_hash)
  super(parent, input_hash)
  trigger(parent, BatchRunnerAction, self, input_hash)
end
operation() click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 19
def operation
  raise NotImplementedError
end
runner_input(input) click to toggle source
# File lib/foreman_tasks_core/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

Private Instance Methods

child_launcher(parent) click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 34
def child_launcher(parent)
  Single.new(world, callback, :parent => parent, :action_class_override => OutputCollectorAction)
end
transform_input(input) click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 38
def transform_input(input)
  wipe_callback(input)
end
wipe_callback(input) click to toggle source
# File lib/foreman_tasks_core/task_launcher/group.rb, line 42
def wipe_callback(input)
  callback = input['action_input']['callback']
  input.merge('action_input' => input['action_input'].merge('callback' => nil, :task_id => callback['task_id']))
end