Add the update_user_directory_from_worker configuration option (superseding update_user_directory) to allow a generic worker to be designated as the worker to update the user directory. (#12654)

Co-authored-by: Shay <hillerys@element.io>
This commit is contained in:
reivilibre 2022-05-10 11:08:45 +01:00 committed by GitHub
parent 8ef0d85acd
commit 699192fc1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 76 additions and 34 deletions

View file

@ -311,6 +311,13 @@ class WorkerConfig(Config):
new_option_name="notify_appservices_from_worker",
)
self.should_update_user_directory = self._should_this_worker_perform_duty(
config,
legacy_master_option_name="update_user_directory",
legacy_worker_app_name="synapse.app.user_dir",
new_option_name="update_user_directory_from_worker",
)
def _should_this_worker_perform_duty(
self,
config: Dict[str, Any],