Skip to main content

purge_stale

Function purge_stale 

Source
pub async fn purge_stale(pool: &PgPool, vault: &Vault) -> AppResult<u64>
Expand description

Removes staged uploads older than STAGED_HOURS and discarded ones (housekeeping), the blobs of STEP files with them – unless something else refers to the blob (a file made from the same content, another staged upload) or it was stored again within retention::IN_FLIGHT_GRACE; such a staged upload stays (expired) until the next run. Returns the number of staged uploads removed.