module DTK::Client::ActionResultHandler

Public Instance Methods

action_results(action_results_id, number_of_retries=8) click to toggle source
# File lib/commands/common/thor/action_result_handler.rb, line 45
def action_results(action_results_id, number_of_retries=8)
  action_body = {
    :action_results_id => action_results_id,
    :return_only_if_complete => true,
    :disable_post_processing => true
  }
  response = nil

  number_of_retries.times do
    response = post(rest_url("assembly/get_action_results"),action_body)

    # server has found an error
    unless response.data(:results).nil?
      if response.data(:results)['error']
        raise DTK::Client::DtkError, response.data(:results)['error']
      end
    end

    break if response.data(:is_complete)

    sleep(1.5)
  end

  response

end
print_action_results(action_results_id, number_of_retries=8) click to toggle source
print_simple_results(action_results_id, number_of_retries=8) click to toggle source