Sha256: 1d9dc287ce895c54f0b582bce4edc532defb7e0fd7a0f1dc26af5c8e11061f4e
Contents?: true
Size: 684 Bytes
Versions: 102
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true require 'json' module SdrClient # API calls around background job results from dor-services-app module BackgroundJobResults # Get status/result of a background job # @param url [String] url for the service # @param job_id [String] required string representing a job identifier # @return [Hash] result of background job def self.show(url:, job_id:) connection = Connection.new(url: "#{url}/v1/background_job_results/#{job_id}").connection resp = connection.get raise "unexpected response: #{resp.status} #{resp.body}" unless resp.success? JSON.parse(resp.body).with_indifferent_access end end end
Version data entries
102 entries across 102 versions & 1 rubygems