Class: HealthCheck::ResqueHealthCheck

Inherits:
Object
  • Object
show all
Extended by:
BaseHealthCheck
Defined in:
lib/health_check/resque_health_check.rb

Class Method Summary collapse

Methods included from BaseHealthCheck

create_error

Class Method Details

.checkObject



5
6
7
8
9
10
11
12
13
# File 'lib/health_check/resque_health_check.rb', line 5

def self.check
  unless defined?(::Resque)
    raise "Wrong configuration. Missing 'resque' gem"
  end
 res = ::Resque.redis.ping
 res == 'PONG' ? '' : "Resque.redis.ping returned #{res.inspect} instead of PONG"
rescue Exception => e
  create_error 'resque-redis', e.message
end