Skip to content

Commit

Permalink
api: fix OOM with sync tasks
Browse files Browse the repository at this point in the history
since sync API calls also use tasks internally, this lead to out of memory due to aptly never removing them.
  • Loading branch information
neolynx committed Aug 3, 2024
1 parent 735d7a4 commit 37a9fbe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37a9fbe

Please sign in to comment.