Small round of MTA queueing improvements

This commit is contained in:
mdecimus
2025-07-12 19:42:27 +02:00
parent e28769c5ce
commit 036cb2ecd4
24 changed files with 278 additions and 266 deletions

View File

@@ -133,7 +133,8 @@ pub(crate) async fn migrate_calendar_events(server: &Server) -> trc::Result<()>
num_migrated += 1;
}
Err(err) => {
if archive.unarchive_untrusted::<CalendarEvent>().is_err() {
if let Err(err_) = archive.unarchive_untrusted::<CalendarEvent>() {
trc::error!(err_.caused_by(trc::location!()));
return Err(err.caused_by(trc::location!()));
}
}

View File

@@ -157,9 +157,13 @@ async fn migrate_v0_12(server: &Server, migrate_tasks: bool) -> trc::Result<()>
}
}
migrate_calendar_events(server)
.await
.caused_by(trc::location!())
if migrate_tasks {
migrate_calendar_events(server)
.await
.caused_by(trc::location!())
} else {
Ok(())
}
}
async fn migrate_v0_11(server: &Server) -> trc::Result<()> {

View File

@@ -278,7 +278,7 @@ where
retry: domain.retry.clone(),
notify: domain.notify.clone(),
queue: QueueName::default(),
expires: QueueExpiry::Duration(domain.expires.saturating_sub(now())),
expires: QueueExpiry::Ttl(domain.expires.saturating_sub(now())),
}
})
.collect(),