Skip to content

Commit

Permalink
fix(api/build): pop executable when pending build is auto canceled (#990
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ecrupper authored Oct 23, 2023
1 parent b51d5a2 commit 7370602
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/build/auto_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ func AutoCancel(c *gin.Context, b *library.Build, rB *library.Build, r *library.
if err != nil {
return false, err
}

// remove executable from table
_, err = database.FromContext(c).PopBuildExecutable(c, rB.GetID())
if err != nil {
return true, err
}
case strings.EqualFold(rB.GetStatus(), constants.StatusRunning) && cancelOpts.Running:
// call cancelRunning routine for builds already running on worker
err := cancelRunning(c, rB, r)
Expand Down

0 comments on commit 7370602

Please sign in to comment.