lib/redismetrics/client.rb
def check_connection
    @redis.ts_info key: Tins::Token.new(bits: 256)
  rescue Redis::CannotConnectError
    raise
  rescue Redis::CommandError => e
    unless e.message == 'ERR TSDB: the key does not exist'
      raise e.class, 'redis server has to be a redistimeseries server'
    end
  end
# Checks the redis connection and raise an error if invalid.
Checks the redis connection and raise an error if invalid.
Checks the redis connection and raise an error if invalid .
def check_connection
    @redis.ts_info key: Tins::Token.new(bits: 256)
  rescue Redis::CannotConnectError
    raise
  rescue Redis::CommandError => e
    unless e.message == 'ERR TSDB: the key does not exist'
      raise e.class, 'redis server has to be a redistimeseries server'
    end
  end
def check_connection @redis . ts_info key : Tins :: Token . new ( bits : 256 ) rescue Redis :: CannotConnectError raise rescue Redis :: CommandError => e unless e . message == 'ERR TSDB: the key does not exist' raise e . class , 'redis server has to be a redistimeseries server' end end
Checks the redis connection and raise an error if invalid.
Checks the redis connection and raise an error if invalid .