diff --git a/internal/logic/gameAct/gameAct.go b/internal/logic/gameAct/gameAct.go index 0cdb90c..3d7b2db 100644 --- a/internal/logic/gameAct/gameAct.go +++ b/internal/logic/gameAct/gameAct.go @@ -110,14 +110,8 @@ func (s *sGameAct) Set(uid int64, actId int, data interface{}) (err error) { } func (s *sGameAct) Saves(ctx context.Context) (err error) { - getCache, _ := pkg.Cache("redis").Get(nil, "cron:game_act") g.Log().Debug(ctx, "开始执行游戏act数据保存了") //如果没有执行过,设置时间戳 - if getCache.Int64() > 0 { - return - } else { - pkg.Cache("redis").Set(nil, "cron:game_act", gtime.Now().Unix(), time.Hour) - } // 最大允许执行时间 RunTimeMax = gtime.Now().Add(time.Minute * 30) //遍历执行 diff --git a/internal/logic/gameKv/gameKv.go b/internal/logic/gameKv/gameKv.go index 7563ea5..64be563 100644 --- a/internal/logic/gameKv/gameKv.go +++ b/internal/logic/gameKv/gameKv.go @@ -45,14 +45,6 @@ func (s *sGameKv) SavesV1(ctx context.Context) (err error) { RunTimeMax = gtime.Now().Add(time.Minute * 30) g.Log().Debug(ctx, "开始执行游戏kv数据保存") - getCache, err := pkg.Cache("redis").Get(nil, "cron:game_kv") - //如果没有执行过,设置时间戳 - if getCache.Int64() > 0 { - return - } else { - pkg.Cache("redis").Set(nil, "cron:game_kv", gtime.Now().Unix(), time.Hour) - } - // 定义用于存储用户数据的结构体 type ListData struct { Uid int64 `json:"uid"`