Skip to content

Commit c01b5af

Browse files
committed
fix(be): deleting incorrect tasks when option max_tasks specified.
#2589
1 parent 349d3c2 commit c01b5af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

db/sql/task.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (d *SqlDb) clearTasks(projectID int, templateID int, maxTasks int) {
5959
return
6060
}
6161

62-
_, err = d.exec("DELETE FROM task WHERE template_id=? AND created>?", templateID, oldestTask.Created)
62+
_, err = d.exec("DELETE FROM task WHERE template_id=? AND created<?", templateID, oldestTask.Created)
6363

6464
if err != nil {
6565
return

0 commit comments

Comments
 (0)