mirror of
https://github.com/element-hq/synapse.git
synced 2025-12-05 01:10:13 +00:00
Fix bug where Duration was logged incorrectly (#19267)
### Pull Request Checklist <!-- Please read https://element-hq.github.io/synapse/latest/development/contributing_guide.html before submitting your pull request --> * [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))
This commit is contained in:
committed by
Devon Hudson
parent
5fe4b7ed60
commit
4cd05baaec
1
changelog.d/19267.bugfix
Normal file
1
changelog.d/19267.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Fix bug where `Duration` was logged incorrectly.
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user