def get_job(job_path, opts = {})
      url     = job_url(job_path, '/live/status')
      headers = gen_headers(opts)

      attempt(opts[:attempts]) do
        method = opts[:head] ? :head : :get
        result = @client.send(method, url, nil, headers)
        raise unless result.is_a? HTTP::Message

        if result.status == 200
          raise unless result.headers['Content-Type'] == 'application/json'

          return true, result.headers if method == :head

          job = JSON.parse(result.body)
          return job, result.headers
        end

        raise_error(result)
      end
    end
def get_job(job_path, opts = {})
      url     = job_url(job_path, '/live/status')
      headers = gen_headers(opts)

      attempt(opts[:attempts]) do
        method = opts[:head] ? :head : :get
        result = @client.send(method, url, nil, headers)
        raise unless result.is_a? HTTP::Message

        if result.status == 200
          raise unless result.headers['Content-Type'] == 'application/json'

          return true, result.headers if method == :head

          job = JSON.parse(result.body)
          return job, result.headers
        end

        raise_error(result)
      end
    end
Gets various information about a job in Manta at a given path.

 The path must start with /<user>/jobs/<job UUID> and point at an actual job.
 :head => true can optionally be passed in to do a HEAD instead of a GET.

 Returns a hash with job information, along with received HTTP headers.

 If there was an unrecoverable error, throws an exception. On connection or
 corruption errors, more attempts will be made; the number of attempts can
 be altered by passing in :attempts.