mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Don't refuse to start worker if media listener configured. (#7002)
Instead lets just warn if the worker has a media listener configured but has the media repository disabled. Previously non media repository workers would just ignore the media listener.
This commit is contained in:
parent
cab4a52535
commit
2201bc9795
1
changelog.d/7002.misc
Normal file
1
changelog.d/7002.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Merge worker apps together.
|
@ -494,20 +494,26 @@ class GenericWorkerServer(HomeServer):
|
|||||||
elif name == "federation":
|
elif name == "federation":
|
||||||
resources.update({FEDERATION_PREFIX: TransportLayerServer(self)})
|
resources.update({FEDERATION_PREFIX: TransportLayerServer(self)})
|
||||||
elif name == "media":
|
elif name == "media":
|
||||||
media_repo = self.get_media_repository_resource()
|
if self.config.can_load_media_repo:
|
||||||
|
media_repo = self.get_media_repository_resource()
|
||||||
|
|
||||||
# We need to serve the admin servlets for media on the
|
# We need to serve the admin servlets for media on the
|
||||||
# worker.
|
# worker.
|
||||||
admin_resource = JsonResource(self, canonical_json=False)
|
admin_resource = JsonResource(self, canonical_json=False)
|
||||||
register_servlets_for_media_repo(self, admin_resource)
|
register_servlets_for_media_repo(self, admin_resource)
|
||||||
|
|
||||||
resources.update(
|
resources.update(
|
||||||
{
|
{
|
||||||
MEDIA_PREFIX: media_repo,
|
MEDIA_PREFIX: media_repo,
|
||||||
LEGACY_MEDIA_PREFIX: media_repo,
|
LEGACY_MEDIA_PREFIX: media_repo,
|
||||||
"/_synapse/admin": admin_resource,
|
"/_synapse/admin": admin_resource,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
logger.warning(
|
||||||
|
"A 'media' listener is configured but the media"
|
||||||
|
" repository is disabled. Ignoring."
|
||||||
|
)
|
||||||
|
|
||||||
if name == "openid" and "federation" not in res["names"]:
|
if name == "openid" and "federation" not in res["names"]:
|
||||||
# Only load the openid resource separately if federation resource
|
# Only load the openid resource separately if federation resource
|
||||||
|
Loading…
Reference in New Issue
Block a user