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
8 9 10 11 12 13 14 15 16 |
# File 'lib/health_check/redis_health_check.rb', line 8 def check raise "Wrong configuration. Missing 'redis' gem" unless defined?(::Redis) client.ping == 'PONG' ? '' : "Redis.ping returned #{res.inspect} instead of PONG" rescue Exception => err create_error 'redis', err. ensure client.disconnect end |
.client ⇒ Object
18 19 20 |
# File 'lib/health_check/redis_health_check.rb', line 18 def client Redis.new(url: HealthCheck.redis_url) end |