Sha256: a4ad1cdce2cf6a4b14629917bb3884791cd7caec2466afbf39a7f455110f2c36

Contents?: true

Size: 657 Bytes

Versions: 16

Compression:

Stored size: 657 Bytes

Contents

module Katello
  module Resources
    module Candlepin
      class Job < CandlepinResource
        class << self
          NOT_FINISHED_STATES = %w(CREATED PENDING RUNNING).freeze unless defined? NOT_FINISHED_STATES

          def not_finished?(job)
            NOT_FINISHED_STATES.include?(job[:state])
          end

          def get(id, params = {})
            job_json = super(path(id) + hash_to_query(params), self.default_headers).body
            job = JSON.parse(job_json)
            job.with_indifferent_access
          end

          def path(id = nil)
            "/candlepin/jobs/#{id}"
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.10.0.rc1.1 app/lib/katello/resources/candlepin/job.rb
katello-3.9.1 app/lib/katello/resources/candlepin/job.rb
katello-3.10.0.rc1 app/lib/katello/resources/candlepin/job.rb
katello-3.9.0 app/lib/katello/resources/candlepin/job.rb
katello-3.8.1 app/lib/katello/resources/candlepin/job.rb
katello-3.9.0.rc2 app/lib/katello/resources/candlepin/job.rb
katello-3.9.0.rc1 app/lib/katello/resources/candlepin/job.rb
katello-3.7.1.1 app/lib/katello/resources/candlepin/job.rb
katello-3.7.1 app/lib/katello/resources/candlepin/job.rb
katello-3.8.0 app/lib/katello/resources/candlepin/job.rb
katello-3.8.0.rc3 app/lib/katello/resources/candlepin/job.rb
katello-3.8.0.rc2 app/lib/katello/resources/candlepin/job.rb
katello-3.7.0 app/lib/katello/resources/candlepin/job.rb
katello-3.8.0.rc1 app/lib/katello/resources/candlepin/job.rb
katello-3.7.0.rc2 app/lib/katello/resources/candlepin/job.rb
katello-3.7.0.rc1 app/lib/katello/resources/candlepin/job.rb