From 9976c00f8e5619ece77d8148baca06e72c91083a Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:52:51 +0800 Subject: [PATCH] refactor: unified naming for module startup functions. --- pkg/common/db/cache/init_redis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/cache/init_redis.go b/pkg/common/db/cache/init_redis.go index a8d26fc6b..97e706727 100644 --- a/pkg/common/db/cache/init_redis.go +++ b/pkg/common/db/cache/init_redis.go @@ -72,7 +72,7 @@ func NewRedis(ctx context.Context, redisConf *config.Redis) (redis.UniversalClie } var err error - ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) + ctx, cancel := context.WithTimeout(ctx, time.Second*10) defer cancel() err = rdb.Ping(ctx).Err() if err != nil {