Skip to main content

purge_finished

Function purge_finished 

Source
pub async fn purge_finished(pool: &PgPool, days: u32) -> AppResult<u64>
Expand description

Removes sent and failed deliveries older than days. Returns the count.

First gives up deliveries still pending for an inactive webhook: an event whose transaction read the webhook as active while an administrator switched it off can commit a row after the switch gave up the waiting ones. The sender never claims such rows, so without this they would stay pending (and in the sender’s index) for ever.