Sha256: d164a46fcafad0400b9bc9c5ba7758a9867979f0d19b98f4344194781e1d8dde

Contents?: true

Size: 499 Bytes

Versions: 134

Compression:

Stored size: 499 Bytes

Contents

module Katello
  module Resources
    module Candlepin
      class Admin < CandlepinResource
        extend AdminResource

        def self.queues
          response = get("#{path}/queues")
          JSON.parse(response.body)
        end

        def self.queue_depth(queue_name)
          queue = queues.select { |q| q['queueName'] == queue_name }
          queue['pendingMessageCount'].to_i
        rescue
          nil # be graceful when candlepin is down
        end
      end
    end
  end
end

Version data entries

134 entries across 134 versions & 1 rubygems

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