Sha256: 05e53fbb10968d623ff88eab5d233cfcc915048cc78213c64569a63df8fde04d
Contents?: true
Size: 580 Bytes
Versions: 7
Compression:
Stored size: 580 Bytes
Contents
module Resque module Integration class QueuesInfo class Size def initialize(config) @config = config end def size(queue) Resque.size(queue) || 0 end def overall max = 0 Resque.queues.each do |queue| size = Resque.size(queue).to_i next if size < threshold(queue) max = size if size > max end max end private def threshold(queue) @config.max_size(queue) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems