This commit is contained in:
2023-09-16 19:59:43 +08:00

View File

@@ -46,9 +46,10 @@ func Connect() {
// 测试数据库连接
pong, err := rdb.Ping(ctx).Result()
if err != nil {
log.Fatalf("failed error ping redis %s is %v", client["host"], err)
log.Fatalf("failed error ping redis %s %d is %v", client["host"], client["db"], err)
continue
}
log.Infof("redis %s %s connection is successful.", client["host"], pong)
log.Infof("redis %s %d %s connection is successful.", client["host"], client["db"], pong)
rdbMap[k] = rdb
}
}