class ResqueToCloudwatch::WorkersAliveCollector
Public Class Methods
new(config)
click to toggle source
# File lib/resque_to_cloudwatch/collectors.rb, line 50 def initialize(config) @config = config end
Public Instance Methods
get_value()
click to toggle source
# File lib/resque_to_cloudwatch/collectors.rb, line 54 def get_value redis = Redis.new(:host => @config.redis_host, :port => @config.redis_port) redis.smembers('resque:workers').length end
metric_name()
click to toggle source
# File lib/resque_to_cloudwatch/collectors.rb, line 59 def metric_name "resque_workers_alive" end
to_s()
click to toggle source
# File lib/resque_to_cloudwatch/collectors.rb, line 63 def to_s metric_name end