Class: HealthCheck::RedisHealthCheck
- Inherits:
-
Object
- Object
- HealthCheck::RedisHealthCheck
- Extended by:
- BaseHealthCheck
- Defined in:
- lib/health_check/redis_health_check.rb
Class Method Summary collapse
Methods included from BaseHealthCheck
Class Method Details
.check ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/health_check/redis_health_check.rb', line 5 def self.check unless defined?(::Redis) raise "Wrong configuration. Missing 'redis' gem" end res = ::Redis.new(url: HealthCheck.redis_url).ping res == 'PONG' ? '' : "Redis.ping returned #{res.inspect} instead of PONG" rescue Exception => e create_error 'redis', e. end |