From d688daf41c372f0d5790a583b5706fab45cdce92 Mon Sep 17 00:00:00 2001 From: Devon Hudson Date: Tue, 2 Dec 2025 20:08:32 +0000 Subject: [PATCH] Fix bug where `Duration` was logged incorrectly (#19267) ### Pull Request Checklist * [X] Pull request is based on the develop branch * [X] Pull request includes a [changelog file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog). The entry should: - Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from `EventStore` to `EventWorkerStore`.". - Use markdown where necessary, mostly for `code blocks`. - End with either a period (.) or an exclamation mark (!). - Start with a capital letter. - Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry. * [X] [Code style](https://element-hq.github.io/synapse/latest/code_style.html) is correct (run the [linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters)) --- changelog.d/19267.bugfix | 1 + synapse/appservice/scheduler.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/19267.bugfix diff --git a/changelog.d/19267.bugfix b/changelog.d/19267.bugfix new file mode 100644 index 000000000..6c7ed750e --- /dev/null +++ b/changelog.d/19267.bugfix @@ -0,0 +1 @@ +Fix bug where `Duration` was logged incorrectly. diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py index befb4ae44..c3a83d140 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py @@ -506,7 +506,7 @@ class _Recoverer: def recover(self) -> None: delay = Duration(seconds=2**self.backoff_counter) - logger.info("Scheduling retries on %s in %fs", self.service.id, delay) + logger.info("Scheduling retries on %s in %fs", self.service.id, delay.as_secs()) self.scheduled_recovery = self.clock.call_later( delay, self.hs.run_as_background_process,