mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 04:43:51 +01:00
Convert delete_url_cache_media to async/await. (#7241)
This commit is contained in:
parent
d78cb31588
commit
1722b8a527
2 changed files with 3 additions and 2 deletions
1
changelog.d/7241.misc
Normal file
1
changelog.d/7241.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Convert some of synapse.rest.media to async/await.
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue