Remove check for being the background_worker app.

pull/8369/head
Patrick Cloke 2020-09-22 14:50:42 -04:00
parent fd8aad312a
commit 67c6fa408a
1 changed files with 0 additions and 16 deletions

View File

@ -962,22 +962,6 @@ def start(config_options):
# For other worker types we force this to off.
config.worker.send_federation = False
if config.worker_app == "synapse.app.background_worker":
if config.worker.run_background_tasks:
sys.stderr.write(
"\nThe run_background_tasks must be disabled in the main synapse process"
"\nbefore they can be run in a separate worker."
"\nPlease add ``run_background_tasks: false`` to the main config"
"\n"
)
sys.exit(1)
# Force the background tasks to start since they will be disabled in the main config
config.worker.run_background_tasks = True
else:
# For other worker types we force this to off.
config.worker.run_background_tasks = False
synapse.events.USE_FROZEN_DICTS = config.use_frozen_dicts
hs = GenericWorkerServer(