From 8d2bc9f15300496ae726e09a587f612f3295a0ee Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Mon, 15 Dec 2025 12:51:24 +0000 Subject: [PATCH] appview/pulls: notify on stacked pull creation the merged_notifier no longer waits for the notifiers to complete. it is now fire-and-forget. Signed-off-by: oppiliappan --- appview/notify/merged_notifier.go | 1 - appview/pulls/pulls.go | 8 ++++++++ 2 file(s) changed, 8 insertion(s)(+), 1 deletion(s)(-) diff --git a/appview/notify/merged_notifier.go b/appview/notify/merged_notifier.go --- a/appview/notify/merged_notifier.go +++ b/appview/notify/merged_notifier.go @@ -39,7 +39,6 @@ v.Call(in) }(n) } - wg.Wait() } func (m *mergedNotifier) NewRepo(ctx context.Context, repo *models.Repo) { diff --git a/appview/pulls/pulls.go b/appview/pulls/pulls.go --- a/appview/pulls/pulls.go +++ b/appview/pulls/pulls.go @@ -1366,12 +1366,20 @@ s.pages.Notice(w, "pull", "Failed to create pull request. Try again later.") return } + } if err = tx.Commit(); err != nil { log.Println("failed to create pull request", err) s.pages.Notice(w, "pull", "Failed to create pull request. Try again later.") return + } + + // notify about each pull + // + // this is performed after tx.Commit, because it could result in a locked DB otherwise + for _, p := range stack { + s.notifier.NewPull(r.Context(), p) } ownerSlashRepo := reporesolver.GetBaseRepoPath(r, repo) -- tangled.sh