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.15.0.rc2 app/lib/katello/resources/candlepin/admin.rb
katello-4.15.0.rc1 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.1 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.0 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.0.rc3 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.0.rc2 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.0.rc1.1 app/lib/katello/resources/candlepin/admin.rb
katello-4.14.0.rc1 app/lib/katello/resources/candlepin/admin.rb
katello-4.13.1 app/lib/katello/resources/candlepin/admin.rb
katello-4.13.0 app/lib/katello/resources/candlepin/admin.rb
katello-4.12.1 app/lib/katello/resources/candlepin/admin.rb
katello-4.13.0.rc1 app/lib/katello/resources/candlepin/admin.rb
katello-4.12.0 app/lib/katello/resources/candlepin/admin.rb
katello-4.12.0.rc3 app/lib/katello/resources/candlepin/admin.rb
katello-4.12.0.rc2 app/lib/katello/resources/candlepin/admin.rb
katello-4.12.0.rc1 app/lib/katello/resources/candlepin/admin.rb
katello-4.11.1 app/lib/katello/resources/candlepin/admin.rb
katello-4.11.0 app/lib/katello/resources/candlepin/admin.rb
katello-4.11.0.rc2 app/lib/katello/resources/candlepin/admin.rb
katello-4.11.0.rc1 app/lib/katello/resources/candlepin/admin.rb