summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-06-21 14:20:46 +0100
committerGitHub <noreply@github.com>2023-06-21 13:20:46 +0000
commit289ce3b8d946c4c4964fac2ff020a0535dead4f0 (patch)
tree47f937354a5df453ea5e7f34f6538490c61c686b /synapse
parentFix typo in faster join docs (#15812) (diff)
downloadsynapse-289ce3b8d946c4c4964fac2ff020a0535dead4f0.tar.xz
Fix harmless exception in port DB script (#15814)
The port DB script would try and run database background tasks, which
could fail if the data they acted on was in the process of being ported.
These exceptions were non fatal.

Fixes #15789
Diffstat (limited to 'synapse')
-rwxr-xr-xsynapse/_scripts/synapse_port_db.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/_scripts/synapse_port_db.py b/synapse/_scripts/synapse_port_db.py
index 27fee3d9a9..a803ada8ad 100755
--- a/synapse/_scripts/synapse_port_db.py
+++ b/synapse/_scripts/synapse_port_db.py
@@ -1369,6 +1369,9 @@ def main() -> None:
         sys.stderr.write("Database must use the 'psycopg2' connector.\n")
         sys.exit(3)
 
+    # Don't run the background tasks that get started by the data stores.
+    hs_config["run_background_tasks_on"] = "some_other_process"
+
     config = HomeServerConfig()
     config.parse_config_dict(hs_config, "", "")