Small round of MTA queueing improvements
This commit is contained in:
@@ -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!()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<()> {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user