0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 02:13:52 +01:00

Convert delete_url_cache_media to async/await. (#7241)

This commit is contained in:
Patrick Cloke 2020-04-07 16:56:34 -04:00 committed by GitHub
parent d78cb31588
commit 1722b8a527
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

1
changelog.d/7241.misc Normal file
View file

@ -0,0 +1 @@
Convert some of synapse.rest.media to async/await.

View file

@ -367,7 +367,7 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
"get_url_cache_media_before", _get_url_cache_media_before_txn
)
def delete_url_cache_media(self, media_ids):
async def delete_url_cache_media(self, media_ids):
if len(media_ids) == 0:
return
@ -380,6 +380,6 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
txn.executemany(sql, [(media_id,) for media_id in media_ids])
return self.db.runInteraction(
return await self.db.runInteraction(
"delete_url_cache_media", _delete_url_cache_media_txn
)