fix: Be less aggressive with progress monitors

This commit is contained in:
timedout authored and Morgan committed 2026-07-02 11:59:37 +01:00
1 parent 614f8adb48
commit eabed74d6e
1 file changed
+7 -8
+7 -8
View File
@@ -766,7 +766,7 @@ impl Service {
) -> SendingResult {
let monitor = self.new_progress_monitor(
format!("Send {} events to appservice {}", events.len(), id),
Duration::from_secs(5),
Duration::from_secs(self.server.config.sender_timeout),
);
let Some(appservice) = self.services.appservice.get_registration(&id).await else {
monitor.notify_one();
@@ -841,17 +841,16 @@ impl Service {
pushkey: String,
events: Vec<SendingEvent>,
) -> SendingResult {
let monitor = self.new_progress_monitor(
format!("Send {} events to pusher {pushkey} for {user_id}", events.len()),
Duration::from_secs(5),
);
let Ok(pusher) = self.services.pusher.get_pusher(&user_id, &pushkey).await else {
monitor.notify_one();
return Err((
Destination::Push(user_id.clone(), pushkey.clone()),
err!(Database(error!(%user_id, ?pushkey, "Missing pusher"))),
));
};
let monitor = self.new_progress_monitor(
format!("Send {} events to pusher {} for {user_id}", pusher.ids.app_id, events.len()),
Duration::from_secs(self.server.config.sender_timeout),
);
let mut pdus = Vec::with_capacity(
events
@@ -916,7 +915,7 @@ impl Service {
) -> SendingResult {
let master_monitor = self.new_progress_monitor(
format!("Dispatch {} events to {server} (overall)", events.len()),
Duration::from_secs(70),
Duration::from_secs(self.server.config.sender_timeout),
);
defer! {{
master_monitor.notify_one();
@@ -984,7 +983,7 @@ impl Service {
request.pdus.len(),
request.edus.len(),
),
Duration::from_mins(1),
Duration::from_secs(self.server.config.sender_timeout),
);
let result = self
.services