Skip to content

Commit

Permalink
fix: Process webhook refresh in background to not block the request (a…
Browse files Browse the repository at this point in the history
…rgoproj#14269)

Signed-off-by: dhruvang1 <[email protected]>
  • Loading branch information
dhruvang1 committed May 12, 2024
1 parent f4fd97d commit 0db36bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion applicationset/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (h *WebhookHandler) Handler(w http.ResponseWriter, r *http.Request) {
return
}

h.HandleEvent(payload)
go h.HandleEvent(payload)
}

func parseRevision(ref string) string {
Expand Down
2 changes: 1 addition & 1 deletion util/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,5 +439,5 @@ func (a *ArgoCDWebhookHandler) Handler(w http.ResponseWriter, r *http.Request) {
return
}

a.HandleEvent(payload)
go a.HandleEvent(payload)
}

0 comments on commit 0db36bd

Please sign in to comment.