summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-09-28 17:10:24 +0100
committerErik Johnston <erik@matrix.org>2021-09-28 17:10:24 +0100
commit584c670802776c57e17347d006488aed7a381cfc (patch)
treeb63092ba4cfca84e82f5d1dcbdf491cabad5afd9
parentFix connectng to postgres when config has no host (diff)
downloadsynapse-584c670802776c57e17347d006488aed7a381cfc.tar.xz
Make the looping call wait until the previous run has finished
Diffstat (limited to '')
-rw-r--r--synapse/util/state_compressor.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/util/state_compressor.py b/synapse/util/state_compressor.py

index 6ec58dc9c6..423bbc77a3 100644 --- a/synapse/util/state_compressor.py +++ b/synapse/util/state_compressor.py
@@ -79,7 +79,9 @@ def setup_state_compressor(hs: "HomeServer"): # parameters that rust doesn't understand, so we need to filter them out. # # Note: we need to connect to the *state* database. - conn_info_params = hs.get_datastores().state.db_pool.postgres_connection_info_parameters + conn_info_params = ( + hs.get_datastores().state.db_pool.postgres_connection_info_parameters + ) assert conn_info_params is not None effective_db_args = {} @@ -100,7 +102,7 @@ def setup_state_compressor(hs: "HomeServer"): # The method to be called periodically def run_state_compressor(): - run_as_background_process( + return run_as_background_process( desc="State Compressor", func=defer_to_thread, reactor=hs.get_reactor(),