mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 13:44:56 -04:00
Convert simple_update* and simple_select* to async (#8173)
This commit is contained in:
parent
a466b67972
commit
4a739c73b4
19 changed files with 164 additions and 133 deletions
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
from collections import namedtuple
|
||||
from typing import Iterable, Optional
|
||||
from typing import Iterable, List, Optional
|
||||
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.storage._base import SQLBaseStore
|
||||
|
@ -68,8 +68,8 @@ class DirectoryWorkerStore(SQLBaseStore):
|
|||
)
|
||||
|
||||
@cached(max_entries=5000)
|
||||
def get_aliases_for_room(self, room_id):
|
||||
return self.db_pool.simple_select_onecol(
|
||||
async def get_aliases_for_room(self, room_id: str) -> List[str]:
|
||||
return await self.db_pool.simple_select_onecol(
|
||||
"room_aliases",
|
||||
{"room_id": room_id},
|
||||
"room_alias",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue