summary refs log tree commit diff
path: root/docker
diff options
context:
space:
mode:
authorrealtyem <realtyem@gmail.com>2022-10-14 14:38:04 -0500
committerGitHub <noreply@github.com>2022-10-14 19:38:04 +0000
commitc75836fe77293c4d8355e454d27c8d97ba87cac5 (patch)
tree24fc38a175b2a23819121b27ddf1bf8b14250265 /docker
parentMerge remote-tracking branch 'origin/release-v1.69' into develop (diff)
downloadsynapse-c75836fe77293c4d8355e454d27c8d97ba87cac5.tar.xz
Strip whitespace from worker types in Dockerfile-workers (#14165)
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/configure_workers_and_start.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py
index 4d78453418..60a5c10ea7 100755
--- a/docker/configure_workers_and_start.py
+++ b/docker/configure_workers_and_start.py
@@ -402,8 +402,8 @@ def generate_worker_files(
         # No workers, just the main process
         worker_types = []
     else:
-        # Split type names by comma
-        worker_types = worker_types_env.split(",")
+        # Split type names by comma, ignoring whitespace.
+        worker_types = [x.strip() for x in worker_types_env.split(",")]
 
     # Create the worker configuration directory if it doesn't already exist
     os.makedirs("/conf/workers", exist_ok=True)
@@ -422,8 +422,6 @@ def generate_worker_files(
 
     # For each worker type specified by the user, create config values
     for worker_type in worker_types:
-        worker_type = worker_type.strip()
-
         worker_config = WORKERS_CONFIG.get(worker_type)
         if worker_config:
             worker_config = worker_config.copy()