summary refs log tree commit diff
path: root/synapse/storage/media_repository.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-10-09 12:29:01 +0100
committerGitHub <noreply@github.com>2019-10-09 12:29:01 +0100
commit59d6290ed98c3395e1ce504531b5c9eb3ad6b005 (patch)
tree8b29b9558e55e176aa1c3c2c4b9ff96e71eb7505 /synapse/storage/media_repository.py
parentadd M_TOO_LARGE error code for uploading a too large file (#6151) (diff)
parentFix RegistrationStore (diff)
downloadsynapse-59d6290ed98c3395e1ce504531b5c9eb3ad6b005.tar.xz
Merge pull request #6178 from matrix-org/babolivier/factor_out_bg_updates
Factor out backgroung updates
Diffstat (limited to 'synapse/storage/media_repository.py')
-rw-r--r--synapse/storage/media_repository.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/synapse/storage/media_repository.py b/synapse/storage/media_repository.py
index 6b1238ce4a..84b5f3ad5e 100644
--- a/synapse/storage/media_repository.py
+++ b/synapse/storage/media_repository.py
@@ -15,11 +15,9 @@
 from synapse.storage.background_updates import BackgroundUpdateStore
 
 
-class MediaRepositoryStore(BackgroundUpdateStore):
-    """Persistence for attachments and avatars"""
-
+class MediaRepositoryBackgroundUpdateStore(BackgroundUpdateStore):
     def __init__(self, db_conn, hs):
-        super(MediaRepositoryStore, self).__init__(db_conn, hs)
+        super(MediaRepositoryBackgroundUpdateStore, self).__init__(db_conn, hs)
 
         self.register_background_index_update(
             update_name="local_media_repository_url_idx",
@@ -29,6 +27,13 @@ class MediaRepositoryStore(BackgroundUpdateStore):
             where_clause="url_cache IS NOT NULL",
         )
 
+
+class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
+    """Persistence for attachments and avatars"""
+
+    def __init__(self, db_conn, hs):
+        super(MediaRepositoryStore, self).__init__(db_conn, hs)
+
     def get_local_media(self, media_id):
         """Get the metadata for a local piece of media
         Returns: