app/models/run.rb
# return true if we want to take this run out of the queue: either for success, or any
# other case where retrying is pointless (e.g. nowhere to send the data, no data to send).
return true if we want to take this run out of the queue: either for success, or any
other case where retrying is pointless .
return true if we want to take this run out of the queue : either for success or any other case where retrying is pointless .
def send_to_portal(answers, start_time = Time.now)
    return true if remote_endpoint.nil? || remote_endpoint.blank? 
    return true if answers.blank? 
    is_success = PortalSender::Protocol.instance(remote_endpoint).post_answers(answers, remote_endpoint, start_time)
    Rails.logger.info("Run sent to portal, success:#{is_success}, " +
      "num_answers:#{answers.count}, #{run_info_string}")
    abort_job_and_requeue(run_info_string() ) unless is_success
    is_success
  end
def send_to_portal ( answers , start_time = Time . now ) return true if remote_endpoint . nil? || remote_endpoint . blank? return true if answers . blank? is_success = PortalSender :: Protocol . instance ( remote_endpoint ) . post_answers ( answers , remote_endpoint , start_time ) Rails . logger . info ( "Run sent to portal, success:#{is_success}, " + "num_answers:#{answers.count}, #{run_info_string}" ) abort_job_and_requeue ( run_info_string ( ) ) unless is_success is_success end
return true if we want to take this run out of the queue: either for success, or any
other case where retrying is pointless (e.g.
return true if we want to take this run out of the queue : either for success or any other case where retrying is pointless ( e . g .
# Drop it on the floor # Pretend we sent it, nobody will notice # TODO: better error detection?
answers
<not_specific>
start_time
<not_specific>
now
<not_specific>