Class: Liveness::Dependencies::Redis

Inherits:
Liveness::Dependency show all
Defined in:
lib/liveness/dependencies/redis.rb

Overview

The PostgreSQL Provider

Since:

  • 0.2.0

Instance Attribute Summary

Attributes inherited from Liveness::Dependency

#name, #timeout

Instance Method Summary collapse

Methods inherited from Liveness::Dependency

#alive?, #connect, #initialize, #status

Constructor Details

This class inherits a constructor from Liveness::Dependency

Instance Method Details

#check!Object

See Also:

  • Liveness::Dependencies::Redis.[Liveness[Liveness::Dependency[Liveness::Dependency#check!]

Since:

  • 0.2.0



13
14
15
16
17
18
19
20
# File 'lib/liveness/dependencies/redis.rb', line 13

def check!
  return false unless defined?(::Redis)

  redis = connect || ::Redis.new
  redis.ping == 'PONG'
rescue ::Redis::BaseError
  false
end