Sha256: d10d43b70bde918d6c5996ab129b41841d7d1866bfb0cffea27e658b2991cb41
Contents?: true
Size: 564 Bytes
Versions: 1
Compression:
Stored size: 564 Bytes
Contents
require 'singleton' module DynoscaleAgent module Worker class Resque include Singleton def self.enabled? require 'resque' require 'resque_latency' true rescue LoadError false end def self.queue_latencies queues.map do |queue| [queue.name, (::Resque.latency(queue)* 1000).ceil, ::Resque.size(queue)] end end def self.queues(source = ::Resque.queues) @@queues ||= source end def self.name 'resque' end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dynoscale_agent-1.0.0 | lib/dynoscale_agent/worker/resque.rb |