Skip to the content

Capsid menu

app/lib/webmention/retention.mjs

9 lines and 1 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of retention.mjs
FunctionLinesComplexityCoveredCRAPMutation
daysInMilliseconds10 to 121No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code

Imports

It imports no other module of this repo. Imported by app/db/webmentions.ts, app/routes/admin.mentions.tsx.

Source

// `failed` rows are noise kept only to spot a pattern; `rejected` rows are kept so a re-sender does not
// reappear as new. `unverified` and `pending` are never swept: the global cap counts them, so expiring
// them would quietly raise the cap.

export const FAILED_RETENTION_DAYS = 30;

export const REJECTED_RETENTION_DAYS = 90;

/** @param {number} days */
export function daysInMilliseconds(days) {
  return days * 24 * 60 * 60 * 1000;
}