summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-10-03 17:30:22 +0100
committerBrendan Abolivier <babolivier@matrix.org>2019-10-07 17:34:26 +0100
commit54f87e07342ddbf82e9b8ee7c7ce227624c2f97b (patch)
tree7cc3cdd666d0cd5ee468a9dc619ef37fa7929cf1 /synapse
parentMove devices's bg updates to a dedicated store (diff)
downloadsynapse-54f87e07342ddbf82e9b8ee7c7ce227624c2f97b.tar.xz
Move media_repository's bg updates to a dedicated store
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/media_repository.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/storage/media_repository.py b/synapse/storage/media_repository.py
index 6b1238ce4a..2eb2740d07 100644
--- a/synapse/storage/media_repository.py
+++ b/synapse/storage/media_repository.py
@@ -15,11 +15,10 @@
 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 +28,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: