Skip to content

Commit

Permalink
fix: ignore redis ping error
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Jan 6, 2025
1 parent 215daf9 commit a5aa936
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion service/aiproxy/common/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a5aa936

Please sign in to comment.