Method: Ecoportal::API::V1::Job#status
- Defined in:
- lib/ecoportal/api/v1/job.rb
#status(job_id) ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/ecoportal/api/v1/job.rb', line 52 def status(job_id) response = client.get("/people/job/#{CGI.escape(job_id)}/status") body = response && body_data(response.body) msg = "Status error (#{response.status}) - " msg << "Errors: #{body}" raise msg unless response.success? Status.new(*body.values_at(*%w[id complete errored progress])) end |