Skip to content

Commit

Permalink
Merge pull request #29 from harness/devmittal
Browse files Browse the repository at this point in the history
fix: [CI-11873]: fixed cleanup issues
  • Loading branch information
devkimittal authored Apr 22, 2024
2 parents 8c38321 + 478264f commit 207031e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handler/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ func HandleDestroy() http.HandlerFunc {

if err != nil {
logger.FromRequest(r).WithError(err).WithField("id", s.ID).Errorln("stage mapping does not exist")
WriteError(w, err)
WriteNotFound(w, err)
return
}
ex.Remove(s.ID)

if d != nil {
logger.FromRequest(r).WithField("id", s.ID).Traceln("starting the destroy process")
if err := d.Engine.Destroy(r.Context()); err != nil {
WriteError(w, err)
} else {
ex.Remove(s.ID)
logger.FromRequest(r).
WithField("latency", time.Since(st)).
WithField("time", time.Now().Format(time.RFC3339)).
Expand Down

0 comments on commit 207031e

Please sign in to comment.