Skip to main content

maybe_cleanup_expired

Function maybe_cleanup_expired 

Source
pub async fn maybe_cleanup_expired(conn: &mut PgConnection) -> ModelResult<()>
Expand description

Probabilistic cleanup instead of a cron.

Soft-delete, not DELETE: credit_registration_account_linking_emails references these rows, and this runs on the click path, so a foreign key violation here would 500 a student opening a valid link.