mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Convert delete_url_cache_media to async/await. (#7241)
This commit is contained in:
parent
d78cb31588
commit
1722b8a527
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 New Issue
Block a user