mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 21: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
|
@ -18,6 +18,7 @@
|
|||
import calendar
|
||||
import logging
|
||||
import time
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from synapse.api.constants import PresenceState
|
||||
from synapse.config.homeserver import HomeServerConfig
|
||||
|
@ -476,14 +477,13 @@ class DataStore(
|
|||
"generate_user_daily_visits", _generate_user_daily_visits
|
||||
)
|
||||
|
||||
def get_users(self):
|
||||
async def get_users(self) -> List[Dict[str, Any]]:
|
||||
"""Function to retrieve a list of users in users table.
|
||||
|
||||
Args:
|
||||
Returns:
|
||||
defer.Deferred: resolves to list[dict[str, Any]]
|
||||
A list of dictionaries representing users.
|
||||
"""
|
||||
return self.db_pool.simple_select_list(
|
||||
return await self.db_pool.simple_select_list(
|
||||
table="users",
|
||||
keyvalues={},
|
||||
retcols=[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue