mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-06 16:04:57 -04:00
Convert simple_select_one and simple_select_one_onecol to async (#8162)
This commit is contained in:
parent
56efa9ec71
commit
4c6c56dc58
25 changed files with 220 additions and 113 deletions
|
@ -260,8 +260,8 @@ class StateGroupWorkerStore(EventsWorkerStore, SQLBaseStore):
|
|||
return event.content.get("canonical_alias")
|
||||
|
||||
@cached(max_entries=50000)
|
||||
def _get_state_group_for_event(self, event_id):
|
||||
return self.db_pool.simple_select_one_onecol(
|
||||
async def _get_state_group_for_event(self, event_id: str) -> Optional[int]:
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="event_to_state_groups",
|
||||
keyvalues={"event_id": event_id},
|
||||
retcol="state_group",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue