summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Little <realtyem@gmail.com>2023-03-04 19:29:22 -0600
committerJason Little <realtyem@gmail.com>2023-03-04 19:29:22 -0600
commitdd9773cb5936d1d0300ef396466fd443cd4e50ce (patch)
treeebfd1d85227c076c5de36ea9bea58268402b18ff
parentMerge branch 'develop' into comp-worker-shorthand (diff)
downloadsynapse-dd9773cb5936d1d0300ef396466fd443cd4e50ce.tar.xz
Change function name and fix docstring to be correct.
-rwxr-xr-xdocker/configure_workers_and_start.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/docker/configure_workers_and_start.py b/docker/configure_workers_and_start.py
index ad2b796641..208f2c1142 100755
--- a/docker/configure_workers_and_start.py
+++ b/docker/configure_workers_and_start.py
@@ -554,7 +554,7 @@ def generate_base_homeserver_config() -> None:
     subprocess.run(["/usr/local/bin/python", "/start.py", "migrate_config"], check=True)
 
 
-def process_worker_types(
+def parse_worker_types_from_env(
     requested_worker_types: List[str],
 ) -> Dict[str, Dict[str, Any]]:
     """Read the desired list of worker from environment variables and prepare the data
@@ -564,11 +564,10 @@ def process_worker_types(
         requested_worker_types: The string pulled from the environment containing
             the worker requested data.
 
-    Returns: A tuple of a complex dict of all information needed to generate worker
-        files and the total count of a given set of worker types. Format:
-
+    Returns: A  dict of all information needed to generate worker files. Format:
         {'worker_name':
             {'worker_base_name': 'base_name'},
+
             {'worker_roles_set':
                 Set{'worker_type', 'other_worker_type'}
             }
@@ -1070,7 +1069,7 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
         else:
             # Split type names by comma, ignoring whitespace.
             worker_types = split_and_strip_string(worker_types_env, ",")
-            requested_worker_types = process_worker_types(worker_types)
+            requested_worker_types = parse_worker_types_from_env(worker_types)
 
         # Always regenerate all other config files
         log("Generating worker config files")