publishAsync fires an event in a fresh goroutine so the handler's response is not blocked by webhook routing. Returns immediately. Uses context.Background() to detach from the request — the publisher is a best-effort post-commit fan-out, not part of the handler's success criteria.
(e webhookpub.Event)
| 268 | // is a best-effort post-commit fan-out, not part of the handler's |
| 269 | // success criteria. |
| 270 | func (a *API) publishAsync(e webhookpub.Event) { |
| 271 | if a.publisher == nil { |
| 272 | return |
| 273 | } |
| 274 | go a.publisher.Publish(context.Background(), e) |
| 275 | } |
| 276 | |
| 277 | // publishSent fires email.sent via BOTH the legacy publisher (in a |
| 278 | // goroutine) AND the slice-4 transactional outbox path. The outbox |