diff options
author | Erik Johnston <erik@matrix.org> | 2021-09-28 17:10:24 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-09-28 17:10:24 +0100 |
commit | 584c670802776c57e17347d006488aed7a381cfc (patch) | |
tree | b63092ba4cfca84e82f5d1dcbdf491cabad5afd9 | |
parent | Fix connectng to postgres when config has no host (diff) | |
download | synapse-584c670802776c57e17347d006488aed7a381cfc.tar.xz |
Make the looping call wait until the previous run has finished
-rw-r--r-- | synapse/util/state_compressor.py | 6 |
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(), |