def get_job_state_streams(type, path, opts)
      raise ArgumentError unless [:in, :out, :fail].include? type

      url     = job_url(path, '/live/' + type.to_s)
      headers = gen_headers(opts)

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

        if result.status == 200
          raise unless result.headers['Content-Type'] == 'text/plain'
          return true, result.headers if method == :head
          paths = result.body.split("\n")
          return paths, result.headers
        end

        raise_error(result)
      end
    end
def get_job_state_streams(type, path, opts)
      raise ArgumentError unless [:in, :out, :fail].include? type

      url     = job_url(path, '/live/' + type.to_s)
      headers = gen_headers(opts)

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

        if result.status == 200
          raise unless result.headers['Content-Type'] == 'text/plain'
          return true, result.headers if method == :head
          paths = result.body.split("\n")
          return paths, result.headers
        end

        raise_error(result)
      end
    end
Fetch lists of objects that have a given status.

 type takes one of three values (:in, :out, fail), path must start with
 /<user>/jobs/<job UUID> and point at an actual job.

 Returns an array of object paths, 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.