mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-05 05:20:34 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user