Merge pull request #5848 from matrix-org/hawkowl/fix-mediarepo-worker-startup

Fix mediarepo worker startup
This commit is contained in:
Brendan Abolivier 2019-08-13 17:38:11 +01:00 committed by GitHub
commit 3039be82ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/5848.feature Normal file
View File

@ -0,0 +1 @@
Synapse will no longer serve any media repo admin endpoints when `enable_media_repo` is set to False in the configuration. If a media repo worker is used, the admin APIs relating to the media repo will be served from it instead.

View File

@ -93,7 +93,7 @@ class ContentRepositoryConfig(Config):
# current worker app is the media repo. # current worker app is the media repo.
if ( if (
self.enable_media_repo is False self.enable_media_repo is False
and config.worker_app != "synapse.app.media_repository" and config.get("worker_app") != "synapse.app.media_repository"
): ):
self.can_load_media_repo = False self.can_load_media_repo = False
return return