cauto 2 years ago
parent
commit
ef709c821b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/logic/tasklog/tasklog.go

+ 1 - 1
internal/logic/tasklog/tasklog.go

@@ -50,7 +50,7 @@ func (c *sTaskLog) ClearTasLog(ctx context.Context) error {
 	if err != nil {
 		return err
 	}
-	_, err = dao.Tasklog.Ctx(ctx).Where("create_at > DATE_SUB(NOW(),INTERVAL ? MINUTE)", config.Value).Delete()
+	_, err = dao.Tasklog.Ctx(ctx).Where("create_at < DATE_SUB(NOW(),INTERVAL ? DAY)", config.Value).Delete()
 	if err != nil {
 		return err
 	}