Skip to content

Commit

Permalink
fix(be): deleting incorrect tasks when option max_tasks specified.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Feb 10, 2025
1 parent 349d3c2 commit c01b5af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/sql/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (d *SqlDb) clearTasks(projectID int, templateID int, maxTasks int) {
return
}

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

if err != nil {
return
Expand Down

0 comments on commit c01b5af

Please sign in to comment.