@ -1,6 +1,7 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
"strconv"
|
||||
@ -344,7 +345,11 @@ func (h *Handlers) HandleAPITriggerDeploy() http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
deployErr := h.deploy.Deploy(request.Context(), application, nil, true)
|
||||
// Use a detached context so the deployment continues even if the
|
||||
// HTTP client disconnects.
|
||||
deployCtx := context.WithoutCancel(request.Context())
|
||||
|
||||
deployErr := h.deploy.Deploy(deployCtx, application, nil, true)
|
||||
if deployErr != nil {
|
||||
h.log.Error("api: failed to trigger deploy", "error", deployErr)
|
||||
h.respondJSON(writer, request,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user