cloudapi: Add artifact cleanup to delete handler
Related: RHEL-60120
This commit is contained in:
parent
56fc58cca3
commit
b33f86783f
2 changed files with 7 additions and 0 deletions
|
|
@ -345,6 +345,11 @@ func (h *apiHandlers) deleteComposeImpl(ctx echo.Context, jobId uuid.UUID) error
|
|||
return HTTPErrorWithInternal(ErrorDeletingJob, err)
|
||||
}
|
||||
|
||||
err = h.server.workers.CleanupArtifacts()
|
||||
if err != nil {
|
||||
return HTTPErrorWithInternal(ErrorDeletingArtifacts, err)
|
||||
}
|
||||
|
||||
return ctx.JSON(http.StatusOK, ComposeDeleteStatus{
|
||||
Href: fmt.Sprintf("/api/image-builder-composer/v2/composes/delete/%v", jobId),
|
||||
Id: jobId.String(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue