mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-06 11:24:59 -04:00
Convert calls of async database methods to async (#8166)
This commit is contained in:
parent
c9fa696ea2
commit
9b7ac03af3
14 changed files with 114 additions and 84 deletions
|
@ -161,16 +161,14 @@ class ApplicationServiceTransactionWorkerStore(
|
|||
return result.get("state")
|
||||
return None
|
||||
|
||||
def set_appservice_state(self, service, state):
|
||||
async def set_appservice_state(self, service, state) -> None:
|
||||
"""Set the application service state.
|
||||
|
||||
Args:
|
||||
service(ApplicationService): The service whose state to set.
|
||||
state(ApplicationServiceState): The connectivity state to apply.
|
||||
Returns:
|
||||
An Awaitable which resolves when the state was set successfully.
|
||||
"""
|
||||
return self.db_pool.simple_upsert(
|
||||
await self.db_pool.simple_upsert(
|
||||
"application_services_state", {"as_id": service.id}, {"state": state}
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue