The user directory background tasks are controlled by a separate flag.

pull/8369/head
Patrick Cloke 2020-09-29 09:08:20 -04:00
parent c015379de0
commit cfe28f2729
3 changed files with 7 additions and 2 deletions

View File

@ -318,6 +318,9 @@ the shared configuration would include:
run_background_tasks_on: background_worker
```
You might also wish to investigate the `update_user_directory` and
`media_instance_running_background_jobs` settings.
### `synapse.app.pusher`
Handles sending push notifications to sygnal and email. Doesn't handle any

View File

@ -54,7 +54,7 @@ class UserDirectoryHandler(StateDeltasHandler):
# Guard to ensure we only process deltas one at a time
self._is_processing = False
if hs.config.run_background_tasks and self.update_user_directory:
if self.update_user_directory:
self.notifier.add_replication_callback(self.notify_new_event)
# We kick this off so that we don't have to wait for a change before

View File

@ -188,7 +188,6 @@ class HomeServer(metaclass=abc.ABCMeta):
REQUIRED_ON_BACKGROUND_TASK_STARTUP = [
"auth",
"stats",
"user_directory",
]
# This is overridden in derived application classes
@ -255,6 +254,9 @@ class HomeServer(metaclass=abc.ABCMeta):
self.datastores = Databases(self.DATASTORE_CLASS, self)
logger.info("Finished setting up.")
# Register background tasks required by this server. This must be done
# somewhat manually due to the background tasks not being registered
# unless handlers are instantiated.
if self.config.run_background_tasks:
self.setup_background_tasks()