v2.0
This commit is contained in:
@@ -27,7 +27,7 @@ func (l *CleanQueryDataHandler) ProcessTask(ctx context.Context, t *asynq.Task)
|
||||
logx.Infof("%s - 开始执行查询数据清理任务", now)
|
||||
|
||||
// 计算3天前的时间
|
||||
threeDaysAgo := time.Now().AddDate(0, 0, -3)
|
||||
threeDaysAgo := time.Now().AddDate(0, 0, -30)
|
||||
|
||||
// 调用QueryModel删除3天前的数据
|
||||
result, err := l.svcCtx.QueryModel.DeleteBefore(ctx, threeDaysAgo)
|
||||
|
||||
Reference in New Issue
Block a user