Skip to main content

prune

Function prune 

Source
pub fn prune(
    form: Form<PruneForm>,
    session: Option<AdminSession>,
    return_to: ReturnTo,
    pool: &State<DbPool>,
) -> Result<Redirect, AdminReject>
Expand description

Prunes per-task snapshots older than the cutoff (POST /admin/retention/prune). Confirmed by the two-step preview + the form’s confirm() dialog; gated (AdminSession) and audited (the audit fairing records the action + actor). Only historical_tasks is touched — run summaries survive. Redirects back to the screen with the count removed; a malformed cutoff is a no-op.