From 41de0dd5a03db4f0a932f5b8fb9e652f7e34c27d Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Wed, 24 Dec 2025 14:35:52 -0600 Subject: [PATCH] Remove ununsed `listeners` --- docker/configure_workers_and_start.py | 28 +-------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py index e7cbd701b8..2cc3d66949 100755 --- a/docker/configure_workers_and_start.py +++ b/docker/configure_workers_and_start.py @@ -758,38 +758,12 @@ def generate_worker_files( # Convenience helper for if using unix sockets instead of host:port using_unix_sockets = environ.get("SYNAPSE_USE_UNIX_SOCKET", False) - # First read the original config file and extract the listeners block. Then we'll - # add another listener for replication. Later we'll write out the result to the - # shared config file. - listeners: list[Any] - if using_unix_sockets: - listeners = [ - { - "path": MAIN_PROCESS_UNIX_SOCKET_PRIVATE_PATH, - "type": "http", - "resources": [{"names": ["replication"]}], - } - ] - else: - listeners = [ - { - "port": MAIN_PROCESS_REPLICATION_PORT, - "bind_address": MAIN_PROCESS_LOCALHOST_ADDRESS, - "type": "http", - "resources": [{"names": ["replication"]}], - } - ] - with open(config_path) as file_stream: - original_config = yaml.safe_load(file_stream) - original_listeners = original_config.get("listeners") - if original_listeners: - listeners += original_listeners # The shared homeserver config. The contents of which will be inserted into the # base shared worker jinja2 template. This config file will be passed to all # workers, included Synapse's main process. It is intended mainly for disabling # functionality when certain workers are spun up, and adding a replication listener. - shared_config: dict[str, Any] = {"listeners": listeners} + shared_config: dict[str, Any] = {} # List of dicts that describe workers. # We pass this to the Supervisor template later to generate the appropriate