~bigbes/core-go

ref: b2c8e81ee698e6de5257e332cc4788b893d20cd5 core-go/webhooks/legacy.go -rw-r--r-- 6.8 KiB
46875256 — Drew DeVault 4 years ago
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.
f44afb10 — Simon Ser 4 years ago
go fmt
48250772 — Simon Ser 4 years ago
Remove %e formatting verbs

%e is not valid for formatting error values:

> %e	scientific notation, e.g. -1.234456e+78

Instead, use %w when using fmt.Errorf (for error wrapping) and
%v when using log.Printf (%w is not valid in that context).
b98647b6 — Drew DeVault 5 years ago
Deduplicate webhook headers on subsequent attempts

This also updates the database with the final payload headers, including
the signature and nonce, which are generated afresh for each attempt.
70c7fe3b — Drew DeVault 5 years ago
webhooks/legacy: increase specificity of logging
d6bd006e — Drew DeVault 5 years ago
workers/legacy: correct Println with fmt directive
b7e39188 — Drew DeVault 5 years ago
Make worker logs less loud
da1a806e — Drew DeVault 5 years ago
webhooks/legacy: address Postgres-specific issues
03619ed2 — Drew DeVault 5 years ago
webhooks/legacy: update only affected delivery

Forgot to add this where clause, whoops!
af2afebd — Drew DeVault 5 years ago
Add legacy webhooks worker implementation