Check Redis connection status

This commit is contained in:
Maksym Pavlenko
2017-08-22 22:58:25 -07:00
parent 751b42177d
commit 0f6ebc4907
+4
View File
@@ -198,5 +198,9 @@ func NewRedisStorage(redisUrl string) (*RedisStorage, error) {
}
client := redis.NewClient(opts)
if err := client.Ping().Err(); err != nil {
return nil, err
}
return &RedisStorage{client}, nil
}