From a5aa936f933dbb6ff2cbb4d8f66cd84065d017fc Mon Sep 17 00:00:00 2001 From: zijiren233 Date: Mon, 6 Jan 2025 22:11:22 +0800 Subject: [PATCH] fix: ignore redis ping error --- service/aiproxy/common/redis.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/aiproxy/common/redis.go b/service/aiproxy/common/redis.go index 30a7ad1b85b..7d26afceb09 100644 --- a/service/aiproxy/common/redis.go +++ b/service/aiproxy/common/redis.go @@ -32,7 +32,12 @@ func InitRedisClient() (err error) { defer cancel() _, err = RDB.Ping(ctx).Result() - return err + if err != nil { + log.Errorf("failed to ping redis: %s", err.Error()) + return err + } + + return nil } func RedisSet(key string, value string, expiration time.Duration) error {