Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Fix logging context warnings due to common usage metrics setup #14574

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/14574.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.67.0 where two logging context warnings would be logged on startup.
4 changes: 3 additions & 1 deletion synapse/metrics/common_usage_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ async def get_metrics(self) -> CommonUsageMetrics:

async def setup(self) -> None:
"""Keep the gauges for common usage metrics up to date."""
await self._update_gauges()
run_as_background_process(
desc="common_usage_metrics_update_gauges", func=self._update_gauges
)
self._clock.looping_call(
run_as_background_process,
5 * 60 * 1000,
Expand Down