Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/middleware/idempotency.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,9 @@ async function idempotency(req, res, next) {
const scope = buildScope(req);
const bodyHash = hashBody(req.body);

// Best-effort prune. Awaited so we don't pile up overlapping
// DELETEs under load; cheap because the index covers it.
// Best-effort prune. Fire-and-forget so the request path never
// waits on DELETE; errors are swallowed via the .catch(). Cheap
// because the index on ikExpiresAt covers it.
pruneExpired(getDb().sequelize).catch(() => {});

let existing;
Expand Down