Compare commits

..

2 Commits

Author SHA1 Message Date
liaoyulong
9fb0513703 act持久化事务最大提交从5改为100 2025-12-05 11:25:18 +08:00
liaoyulong
7b96919d80 最后一次的count放到计数中 2025-12-04 12:23:36 +08:00

View File

@@ -26,7 +26,7 @@ var (
Name = "game_act"
ActList = gset.New(true)
RunTimeMax *gtime.Time
TaskMax int64 = 5
TaskMax int64 = 100
)
type sGameAct struct {
@@ -605,6 +605,8 @@ func (s *sGameAct) Cache2SqlChan(ctx context.Context, addChan, updateChan chan *
}
err = tx.Commit()
addAllCount += addCount
updateAllCount += updateCount
// 仅在所有通道处理完毕后打印最终计数(移除中间冗余日志)
g.Log().Debugf(ctx, "运行结束act当前写入数据库: %v 条", addAllCount)
g.Log().Debugf(ctx, "运行结束act当前更新数据库: %v 条", updateAllCount)