Tweaks and fixes to background tasks (#4447)

* adjustments

* chore: query cache, clippy, fmt
This commit is contained in:
François-Xavier Talbot
2025-09-30 12:43:59 +01:00
committed by GitHub
parent 53c9699b46
commit 54747aa628
13 changed files with 59 additions and 42 deletions

View File

@@ -236,7 +236,7 @@ impl EmailQueue {
let update_next_attempt =
status == NotificationDeliveryStatus::Pending;
let mut delivery = deliveries.remove(idx);
let mut delivery = deliveries.swap_remove(idx);
delivery.status = status;
delivery.next_attempt += if update_next_attempt {
chrono::Duration::seconds(EMAIL_RETRY_DELAY_SECONDS)