class Status

This is the v4 image only work status api.

was used by Server#run_script (depricating..)

API 1.0

Public Instance Methods

wait_for_completed(audit_link = "no audit link available", timeout = 900) click to toggle source
# File lib/rest_connection/rightscale/status.rb, line 35
def wait_for_completed(audit_link = "no audit link available", timeout = 900)
  while(timeout > 0)
    reload
    return true if self.state == "completed"
    raise "FATAL error, script failed\nSee Audit: #{audit_link}" if self.state == 'failed'
    sleep 30
    timeout -= 30
    connection.logger("querying status of right_script.. got: #{self.state}")
  end
  raise "FATAL: Timeout waiting for Executable to complete.  State was #{self.state}" if timeout <= 0
end