summary refs log tree commit diff
path: root/synapse/metrics/background_process_metrics.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:16:43 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:16:43 +0000
commit35d74a232c7b6141706e1ceaf2e2342ad5dce301 (patch)
tree39983a41a60b176389c224a66371e9b47f8c040e /synapse/metrics/background_process_metrics.py
parent1.11.0 (diff)
parentClarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957) (diff)
downloadsynapse-35d74a232c7b6141706e1ceaf2e2342ad5dce301.tar.xz
Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)
* commit '509e381af':
  Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)
  changelog
  Increase MAX_EVENTS_BEHIND for replication clients
Diffstat (limited to 'synapse/metrics/background_process_metrics.py')
-rw-r--r--synapse/metrics/background_process_metrics.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/metrics/background_process_metrics.py b/synapse/metrics/background_process_metrics.py

index c53d2a0d40..b65bcd8806 100644 --- a/synapse/metrics/background_process_metrics.py +++ b/synapse/metrics/background_process_metrics.py
@@ -80,13 +80,13 @@ _background_process_db_sched_duration = Counter( # map from description to a counter, so that we can name our logcontexts # incrementally. (It actually duplicates _background_process_start_count, but # it's much simpler to do so than to try to combine them.) -_background_process_counts = dict() # type: dict[str, int] +_background_process_counts = {} # type: dict[str, int] # map from description to the currently running background processes. # # it's kept as a dict of sets rather than a big set so that we can keep track # of process descriptions that no longer have any active processes. -_background_processes = dict() # type: dict[str, set[_BackgroundProcess]] +_background_processes = {} # type: dict[str, set[_BackgroundProcess]] # A lock that covers the above dicts _bg_metrics_lock = threading.Lock()