diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-11-21 11:08:08 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-11-22 16:19:49 +0000 |
commit | e1fd4751de8e96907ea97afaf91525e68ce22227 (patch) | |
tree | f7b2374e66930e40e0bf00a96f61e129a931dee4 /synapse/app/media_repository.py | |
parent | Merge pull request #2700 from matrix-org/rav/worker_docs (diff) | |
download | synapse-e1fd4751de8e96907ea97afaf91525e68ce22227.tar.xz |
Build MediaRepositoryResource as a homeserver dependency
This avoids the scenario where we have four different PreviewUrlResources configured on a single app, each of which have their own caches and cache clearing jobs.
Diffstat (limited to 'synapse/app/media_repository.py')
-rw-r--r-- | synapse/app/media_repository.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/app/media_repository.py b/synapse/app/media_repository.py index 36c18bdbcb..f54beeb15d 100644 --- a/synapse/app/media_repository.py +++ b/synapse/app/media_repository.py @@ -35,7 +35,6 @@ from synapse.replication.slave.storage.registration import SlavedRegistrationSto from synapse.replication.slave.storage.transactions import TransactionStore from synapse.replication.tcp.client import ReplicationClientHandler from synapse.rest.media.v0.content_repository import ContentRepoResource -from synapse.rest.media.v1.media_repository import MediaRepositoryResource from synapse.server import HomeServer from synapse.storage.engines import create_engine from synapse.storage.media_repository import MediaRepositoryStore @@ -89,7 +88,7 @@ class MediaRepositoryServer(HomeServer): if name == "metrics": resources[METRICS_PREFIX] = MetricsResource(self) elif name == "media": - media_repo = MediaRepositoryResource(self) + media_repo = self.get_media_repository_resource() resources.update({ MEDIA_PREFIX: media_repo, LEGACY_MEDIA_PREFIX: media_repo, |