From c01b5aff8b17201fc8175080a46ba40fd0040ed5 Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Mon, 10 Feb 2025 23:21:26 +0500 Subject: [PATCH] fix(be): deleting incorrect tasks when option max_tasks specified. https://github.com/semaphoreui/semaphore/issues/2589 --- db/sql/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/sql/task.go b/db/sql/task.go index 2f0cc8c96..cc9bd4f3e 100644 --- a/db/sql/task.go +++ b/db/sql/task.go @@ -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