mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-23 05:44:53 -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
|
@ -99,17 +99,18 @@ class MonthlyActiveUsersWorkerStore(SQLBaseStore):
|
|||
return users
|
||||
|
||||
@cached(num_args=1)
|
||||
def user_last_seen_monthly_active(self, user_id):
|
||||
async def user_last_seen_monthly_active(self, user_id: str) -> int:
|
||||
"""
|
||||
Checks if a given user is part of the monthly active user group
|
||||
Arguments:
|
||||
user_id (str): user to add/update
|
||||
Return:
|
||||
Deferred[int] : timestamp since last seen, None if never seen
|
||||
Checks if a given user is part of the monthly active user group
|
||||
|
||||
Arguments:
|
||||
user_id: user to add/update
|
||||
|
||||
Return:
|
||||
Timestamp since last seen, None if never seen
|
||||
"""
|
||||
|
||||
return self.db_pool.simple_select_one_onecol(
|
||||
return await self.db_pool.simple_select_one_onecol(
|
||||
table="monthly_active_users",
|
||||
keyvalues={"user_id": user_id},
|
||||
retcol="timestamp",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue