Class: Resque::StuckQueue::HeartbeatJob
- Inherits:
-
Object
- Object
- Resque::StuckQueue::HeartbeatJob
- Defined in:
- lib/resque_stuck_queue/heartbeat_job.rb
Class Attribute Summary collapse
-
.redis ⇒ Object
Returns the value of attribute redis.
Class Method Summary collapse
Class Attribute Details
.redis ⇒ Object
Returns the value of attribute redis.
6 7 8 |
# File 'lib/resque_stuck_queue/heartbeat_job.rb', line 6 def redis @redis end |
Class Method Details
.perform(*args) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/resque_stuck_queue/heartbeat_job.rb', line 8 def perform(*args) keyname,host,port,namespace = *args @redis = Redis::Namespace.new(namespace, :redis => Redis.new(:host => host, :port => port)) @redis.set(keyname, Time.now.to_i) Resque::StuckQueue.logger.info "successfully updated key #{keyname}" end |