summary refs log tree commit diff
path: root/synapse/metrics/background_process_metrics.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-10-09 09:47:37 +0100
committerRichard van der Hoff <richard@matrix.org>2018-10-09 09:47:37 +0100
commit1a0c407e6bde2e4a878c450d76f0a898bac48b72 (patch)
tree8b76f493408ae57c0e5b8703acd7334ffb34e722 /synapse/metrics/background_process_metrics.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
parentMerge pull request #3995 from matrix-org/rav/no_deextrem_outliers (diff)
downloadsynapse-1a0c407e6bde2e4a878c450d76f0a898bac48b72.tar.xz
Merge remote-tracking branch 'origin/develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/metrics/background_process_metrics.py')
-rw-r--r--synapse/metrics/background_process_metrics.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py

index 173908299c..037f1c490e 100644 --- a/synapse/metrics/background_process_metrics.py +++ b/synapse/metrics/background_process_metrics.py
@@ -101,9 +101,13 @@ class _Collector(object): labels=["name"], ) - # We copy the dict so that it doesn't change from underneath us + # We copy the dict so that it doesn't change from underneath us. + # We also copy the process lists as that can also change with _bg_metrics_lock: - _background_processes_copy = dict(_background_processes) + _background_processes_copy = { + k: list(v) + for k, v in six.iteritems(_background_processes) + } for desc, processes in six.iteritems(_background_processes_copy): background_process_in_flight_count.add_metric(