Sha256: fa7c2d37746d90324009a1f56b57974f5db00eb3d4e07a627e7fb5a85d1ec1be

Contents?: true

Size: 665 Bytes

Versions: 175

Compression:

Stored size: 665 Bytes

Contents

module Katello
  module Resources
    module Candlepin
      class Job < CandlepinResource
        class << self
          NOT_FINISHED_STATES = %w(CREATED WAITING 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

175 entries across 175 versions & 1 rubygems

Version Path
katello-4.2.0.rc2 app/lib/katello/resources/candlepin/job.rb
katello-4.1.3 app/lib/katello/resources/candlepin/job.rb
katello-4.2.0.rc1 app/lib/katello/resources/candlepin/job.rb
katello-4.0.2.1 app/lib/katello/resources/candlepin/job.rb
katello-4.1.2.1 app/lib/katello/resources/candlepin/job.rb
katello-4.0.2 app/lib/katello/resources/candlepin/job.rb
katello-4.1.2 app/lib/katello/resources/candlepin/job.rb
katello-3.18.4 app/lib/katello/resources/candlepin/job.rb
katello-4.1.1 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0 app/lib/katello/resources/candlepin/job.rb
katello-4.0.1.2 app/lib/katello/resources/candlepin/job.rb
katello-3.18.3.1 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0.rc2.2 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0.rc2.1 app/lib/katello/resources/candlepin/job.rb
katello-4.0.1.1 app/lib/katello/resources/candlepin/job.rb
katello-3.18.3 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0.rc2 app/lib/katello/resources/candlepin/job.rb
katello-4.0.1 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0.rc1.1 app/lib/katello/resources/candlepin/job.rb
katello-4.1.0.rc1 app/lib/katello/resources/candlepin/job.rb