summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2023-11-16 15:55:37 +0000
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2023-11-17 12:03:56 +0000
commit3bb21a9c265f24c5855c72aac3cb222b8fb3daff (patch)
tree536130e4b1b1fc994045f35f0c54df3388c8860a
parentAdd `sharding_allowed` to the WorkerTemplate rather than having a separate fu... (diff)
downloadsynapse-3bb21a9c265f24c5855c72aac3cb222b8fb3daff.tar.xz
Use `merge_into` when adding workers to the shared config
-rwxr-xr-xdocker/configure_workers_and_start.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py
index 3d5fe3a73c..a9f4831194 100755
--- a/docker/configure_workers_and_start.py
+++ b/docker/configure_workers_and_start.py
@@ -784,10 +784,9 @@ def generate_worker_files(
             {"name": worker_name, "port": str(worker_port), "config_path": config_path}
         )
 
-        # Update the shared config with any worker_type specific options. The first of a
-        # given worker_type needs to stay assigned and not be replaced.
-        worker_config["shared_extra_conf"].update(shared_config)
-        shared_config = worker_config["shared_extra_conf"]
+        # Update the shared config with any options needed to enable this worker.
+        merge_into(shared_config, worker_config["shared_extra_conf"])
+
         if using_unix_sockets:
             healthcheck_urls.append(
                 f"--unix-socket /run/worker.{worker_port} http://localhost/health"