pub async fn purge_expired(pool: &PgPool, vault: &Vault) -> AppResult<u64>Expand description
Removes expired sessions with their data, and staging files that have no
session any more (e.g. after a crash between the two). Content that was
verified and moved into the vault but never became a file version goes
too – unless something else refers to it or it was stored again within
retention::IN_FLIGHT_GRACE; such a session stays (expired, unusable)
until the next run. Returns the number of sessions removed.