From 37a9fbe530e27717dfe3eaa00362e491103a5678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Roth?= Date: Sat, 3 Aug 2024 12:44:29 +0200 Subject: [PATCH] api: fix OOM with sync tasks since sync API calls also use tasks internally, this lead to out of memory due to aptly never removing them. --- api/api.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/api.go b/api/api.go index ed46e457..a52406d8 100644 --- a/api/api.go +++ b/api/api.go @@ -175,6 +175,7 @@ func maybeRunTaskInBackground(c *gin.Context, name string, resources []string, p retValue, _ := context.TaskList().GetTaskReturnValueByID(task.ID) err, _ := context.TaskList().GetTaskErrorByID(task.ID) + context.TaskList().DeleteTaskByID(task.ID) if err != nil { AbortWithJSONError(c, retValue.Code, err) return