diff options
author | Erik Johnston <erik@matrix.org> | 2018-01-12 10:39:27 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-01-12 10:39:27 +0000 |
commit | f4d93ae424bec48f7d0d68d885942dc83d5780d7 (patch) | |
tree | 6366a247b71b8a1997afb287dd6cf4441e29aa9b /synapse/app | |
parent | Refactor (diff) | |
download | synapse-f4d93ae424bec48f7d0d68d885942dc83d5780d7.tar.xz |
Actually make it work
Diffstat (limited to 'synapse/app')
-rwxr-xr-x | synapse/app/synctl.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/synapse/app/synctl.py b/synapse/app/synctl.py index 4bd8f735ff..0f0ddfa78a 100755 --- a/synapse/app/synctl.py +++ b/synapse/app/synctl.py @@ -207,11 +207,19 @@ def main(): # We need to special case all of this to pick up options that may # be set in the main config file or in this worker config file. worker_pidfile = ( - worker_config.get("worker_pid_file") - or worker_config("pid_file") + worker_config.get("pid_file") or pidfile ) worker_cache_factor = worker_config.get("synctl_cache_factor") or cache_factor + daemonize = worker_config.get("daemonize") or config.get("daemonize") + assert daemonize, "Main process must have daemonize set to true" + + # The master process doesn't support using worker_* config. + for key in worker_config: + if key == "worker_app": # But we allow worker_app + continue + assert not key.startswith("worker_"), \ + "Main process cannot use worker_* config" else: worker_pidfile = worker_config["worker_pid_file"] worker_daemonize = worker_config["worker_daemonize"] |