Sha256: 8552be32edb7a48936d89804394aaa8a9c6644bccae400196845cb43471a155f

Contents?: true

Size: 438 Bytes

Versions: 69

Compression:

Stored size: 438 Bytes

Contents

require "resque"

redis_server = Rubber.instances.for_role('redis_master').first.full_name rescue nil
redis_server ||= 'localhost' if Rubber.env == 'development'
Resque.redis = "#{redis_server}:6379"

queue_sizes = {}
Resque.redis.smembers("queues").each do |queue_name|
  queue_size = Resque.redis.llen("queue:#{queue_name}")

  puts "PUTVAL #{HOSTNAME}/resque_worker/gauge-#{queue_name}_queued interval=#{INTERVAL} N:#{queue_size}"
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
rubber-3.2.2 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-3.2.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-3.2.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-3.1.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-3.0.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-3.0.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.16.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.15.2 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.15.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.15.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.14.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.13.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.13.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.12.2 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.12.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.12.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.11.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.10.2 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.10.1 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb
rubber-2.10.0 templates/collectd/script/collectd/role/web_tools/global_worker_stats.rb