pub async fn retry(
pool: &PgPool,
actor: &Actor,
delivery_id: Uuid,
) -> AppResult<Delivery>Expand description
Schedules a failed (or waiting) delivery again, now, with a fresh set of attempts. The delivery id stays the same, so receivers can deduplicate.
§Invariants
- Permission: administrator (403); unknown delivery is “not found”; a delivery already sent (409) or of an inactive webhook (409) is refused.
- Locks: the delivery row (
FOR UPDATE). - Data: status back to pending, attempts reset to 0, due now.
- Audit:
webhook.retry. - Notifications / webhooks: none.
- Atomic: one transaction.