class Proxy::Dynflow::TaskLauncher::AbstractGroup

Public Class Methods

new(*args) click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 8
def initialize(*args)
  super
  @runner_id = SecureRandom.uuid
end
runner_class() click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 13
def self.runner_class
  raise NotImplementedError
end

Public Instance Methods

action_class() click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 17
def action_class
  Action::SingleRunnerBatch
end
launch_children(parent, input_hash) click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 21
def launch_children(parent, input_hash)
  super(parent, input_hash)
  trigger(parent, Action::BatchRunner, self, input_hash, @runner_id)
end
operation() click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 26
def operation
  raise NotImplementedError
end
runner_input(input) click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 30
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/smart_proxy_dynflow/task_launcher/group.rb, line 41
def child_launcher(parent)
  Single.new(world, callback, :parent => parent, :action_class_override => Action::OutputCollector)
end
transform_input(input) click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 45
def transform_input(input)
  tmp = wipe_callback(input)
  input.merge('action_input' => tmp['action_input'].merge(:runner_id => @runner_id))
end
wipe_callback(input) click to toggle source
# File lib/smart_proxy_dynflow/task_launcher/group.rb, line 50
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