summary refs log tree commit diff
path: root/synapse/storage/data_stores
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-03-31 09:33:02 -0400
committerGitHub <noreply@github.com>2020-03-31 09:33:02 -0400
commit0a7b0882c1d1f52bde46d6f367f265bc330e8bd0 (patch)
tree3efce8bd0014bbb8e8cf0ccd03f62868360edccb /synapse/storage/data_stores
parentFix a bug which could cause incorrect 'cyclic dependency' error. (#7178) (diff)
downloadsynapse-0a7b0882c1d1f52bde46d6f367f265bc330e8bd0.tar.xz
Fix use of async/await in media code (#7184)
Diffstat (limited to 'synapse/storage/data_stores')
-rw-r--r--synapse/storage/data_stores/main/media_repository.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/data_stores/main/media_repository.py b/synapse/storage/data_stores/main/media_repository.py
index 80ca36dedf..cf195f8aa6 100644
--- a/synapse/storage/data_stores/main/media_repository.py
+++ b/synapse/storage/data_stores/main/media_repository.py
@@ -340,7 +340,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
             "get_expired_url_cache", _get_expired_url_cache_txn
         )
 
-    def delete_url_cache(self, media_ids):
+    async def delete_url_cache(self, media_ids):
         if len(media_ids) == 0:
             return
 
@@ -349,7 +349,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
         def _delete_url_cache_txn(txn):
             txn.executemany(sql, [(media_id,) for media_id in media_ids])
 
-        return self.db.runInteraction("delete_url_cache", _delete_url_cache_txn)
+        return await self.db.runInteraction("delete_url_cache", _delete_url_cache_txn)
 
     def get_url_cache_media_before(self, before_ts):
         sql = (