mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-22 09:30:32 -04:00
Convert additional database methods to async (select list, search, insert_many, delete_*) (#8168)
This commit is contained in:
parent
4a739c73b4
commit
30426c7063
8 changed files with 67 additions and 84 deletions
|
@ -314,14 +314,14 @@ class MediaRepositoryStore(MediaRepositoryBackgroundUpdateStore):
|
|||
desc="store_remote_media_thumbnail",
|
||||
)
|
||||
|
||||
def get_remote_media_before(self, before_ts):
|
||||
async def get_remote_media_before(self, before_ts):
|
||||
sql = (
|
||||
"SELECT media_origin, media_id, filesystem_id"
|
||||
" FROM remote_media_cache"
|
||||
" WHERE last_access_ts < ?"
|
||||
)
|
||||
|
||||
return self.db_pool.execute(
|
||||
return await self.db_pool.execute(
|
||||
"get_remote_media_before", self.db_pool.cursor_to_dict, sql, before_ts
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue