mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 12:46:49 +00:00
fix: Be less aggressive with progress monitors
This commit is contained in:
1 parent
614f8adb48
commit
eabed74d6e
1 file changed
+7
-8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user