diff options
author | Erik Johnston <erik@matrix.org> | 2016-06-29 14:57:59 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-06-29 14:57:59 +0100 |
commit | a70688445dd7a9fa41a55a642fb9a394f291ae45 (patch) | |
tree | 780be0bce7d1f48decb341bd665237435b992bda /synapse/server.py | |
parent | Track approximate last access time for remote media (diff) | |
download | synapse-a70688445dd7a9fa41a55a642fb9a394f291ae45.tar.xz |
Implement purge_media_cache admin API
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py index dd4b81c658..d49a1a8a96 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -45,6 +45,7 @@ from synapse.crypto.keyring import Keyring from synapse.push.pusherpool import PusherPool from synapse.events.builder import EventBuilderFactory from synapse.api.filtering import Filtering +from synapse.rest.media.v1.media_repository import MediaRepository from synapse.http.matrixfederationclient import MatrixFederationHttpClient @@ -113,6 +114,7 @@ class HomeServer(object): 'filtering', 'http_client_context_factory', 'simple_http_client', + 'media_repository', ] def __init__(self, hostname, **kwargs): @@ -233,6 +235,9 @@ class HomeServer(object): **self.db_config.get("args", {}) ) + def build_media_repository(self): + return MediaRepository(self) + def remove_pusher(self, app_id, push_key, user_id): return self.get_pusherpool().remove_pusher(app_id, push_key, user_id) |