Skip to content

Commit dff45f0

Browse files
committed
fix redis connection
1 parent b6c292e commit dff45f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cache/redis.go

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ func newRedisCache(cfg *Config) (Cache, error) {
1919
Password: cfg.Password,
2020
DB: cfg.DbIndex,
2121
})
22+
23+
if err := cl.Ping(context.Background()).Err(); err != nil {
24+
return nil, err
25+
}
26+
27+
logs.Info("Connected to redis")
2228
return &redisCache{
2329
client: cl,
2430
}, nil

0 commit comments

Comments
 (0)