Sha256: e7932ba31633d28fec67b4ccd3d9abb302bc200bbebb318ee6e95c126aaa76b2
Contents?: true
Size: 505 Bytes
Versions: 15
Compression:
Stored size: 505 Bytes
Contents
module Katello module Resources module Candlepin class Admin < CandlepinResource extend AdminResource def self.queues response = get("#{path}/queues") JSON.parse(response.body).first 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
15 entries across 15 versions & 1 rubygems