Skip to content

Commit d688daf

Browse files
authored
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))
1 parent aff90a5 commit d688daf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/19267.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug where `Duration` was logged incorrectly.

synapse/appservice/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ def __init__(
506506

507507
def recover(self) -> None:
508508
delay = Duration(seconds=2**self.backoff_counter)
509-
logger.info("Scheduling retries on %s in %fs", self.service.id, delay)
509+
logger.info("Scheduling retries on %s in %fs", self.service.id, delay.as_secs())
510510
self.scheduled_recovery = self.clock.call_later(
511511
delay,
512512
self.hs.run_as_background_process,

0 commit comments

Comments
 (0)