46875256
webhooks/legacy: fetch subscriptions upfront
This fixes a race condition when delivering webhooks for resource deletion events, in which the subscriptions would be removed from the delete cascade before the task to fetch them executes. This requires the downstream code to call Queue before committing the delete transaction, and updates the API to include a context argument for the connection pool.
Drew DeVault <sir@cmpwn.com> — 2021-09-09 08:42:13 UTC
Commit 468752564125e79b5efdfff091d8886dc23e373a —
view raw patch
Parent(s):
d74ae98e
| File | Status | + | − |
|---|---|---|---|
webhooks/legacy.go
|
M | +9 | -9 |