Class: Sensu::Redis
- Inherits:
-
Object
- Object
- Sensu::Redis
- Defined in:
- lib/sensu/redis.rb
Class Method Summary collapse
-
.connect(options = {}) ⇒ Object
Connect to Redis and ensure that the Redis version is at least 1.3.14, in order to support certain commands.
Class Method Details
.connect(options = {}) ⇒ Object
Connect to Redis and ensure that the Redis version is at least 1.3.14, in order to support certain commands.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/sensu/redis.rb', line 12 def self.connect(={}) ||= {} connection = EM::Protocols::Redis.connect() connection.info do |info| if info[:redis_version] < "1.3.14" klass = EM::Protocols::Redis::RedisError = "redis version must be >= 2.0 RC 1" connection.error(klass, ) end end connection end |