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:
Devon Hudson
2025-12-02 20:08:32 +00:00
committed by GitHub
parent aff90a5245
commit d688daf41c
2 changed files with 2 additions and 1 deletions

1
changelog.d/19267.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix bug where `Duration` was logged incorrectly.

View File

@@ -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,