class ForemanTasksCore::BatchCallback
Public Instance Methods
plan(input_hash, results)
click to toggle source
# File lib/foreman_tasks_core/batch_callback_action.rb, line 3 def plan(input_hash, results) plan_self :targets => input_hash, :results => results end
run()
click to toggle source
# File lib/foreman_tasks_core/batch_callback_action.rb, line 7 def run payload = format_payload(input['targets'], input['results']) SmartProxyDynflowCore::Callback::Request.new.callback({ :callbacks => payload }.to_json) end
Private Instance Methods
format_payload(input_hash, results)
click to toggle source
# File lib/foreman_tasks_core/batch_callback_action.rb, line 14 def format_payload(input_hash, results) input_hash.map do |task_id, callback| { :callback => callback, :data => results[task_id] } end end