8181MAIN_PROCESS_UNIX_SOCKET_PUBLIC_PATH = "/run/main_public.sock"
8282MAIN_PROCESS_UNIX_SOCKET_PRIVATE_PATH = "/run/main_private.sock"
8383
84+ # We place a file at this path to indicate that the script has already been
85+ # run and should not be run again.
86+ MARKER_FILE_PATH = "/conf/workers_have_been_configured"
87+
8488
8589@dataclass
8690class WorkerTemplate :
@@ -980,8 +984,8 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
980984 log ("Base homeserver config exists—not regenerating" )
981985 # This script may be run multiple times (mostly by Complement, see note at top of
982986 # file). Don't re-configure workers in this instance.
983- mark_filepath = "/conf/workers_have_been_configured"
984- if not os .path .exists (mark_filepath ):
987+
988+ if not os .path .exists (MARKER_FILE_PATH ):
985989 # Collect and validate worker_type requests
986990 # Read the desired worker configuration from the environment
987991 worker_types_env = environ .get ("SYNAPSE_WORKER_TYPES" , "" ).strip ()
@@ -1000,7 +1004,7 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
10001004 generate_worker_files (environ , config_path , data_dir , requested_worker_types )
10011005
10021006 # Mark workers as being configured
1003- with open (mark_filepath , "w" ) as f :
1007+ with open (MARKER_FILE_PATH , "w" ) as f :
10041008 f .write ("" )
10051009 else :
10061010 log ("Worker config exists—not regenerating" )
0 commit comments