缓存key删除失败不报错

This commit is contained in:
ayflying
2025-08-20 15:13:01 +08:00
parent f68655eee6
commit 607bdaf4c6
2 changed files with 6 additions and 7 deletions

View File

@@ -226,7 +226,6 @@ func (s *sGameAct) Save(ctx context.Context, actId int) (err error) {
_, err = g.Redis().Del(ctx, v)
if err != nil {
g.Log().Error(ctx, err)
return
}
}
delKey = make([]string, 0)

View File

@@ -2,16 +2,17 @@ package gameKv
import (
"fmt"
"strconv"
"strings"
"sync"
"time"
"github.com/ayflying/utility_go/pkg"
"github.com/ayflying/utility_go/service"
"github.com/ayflying/utility_go/tools"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx"
"github.com/gogf/gf/v2/os/gtime"
"strconv"
"strings"
"sync"
"time"
)
var (
@@ -107,8 +108,7 @@ func (s *sGameKv) SavesV1() (err error) {
for _, v := range delKey {
_, err2 = g.Redis().Del(ctx, v)
if err2 != nil {
g.Log().Errorf(ctx, "删除存档错误%v,err=%v", v, err2)
return
g.Log().Errorf(ctx, "删除存档失败%v,err=%v", v, err2)
}
}