diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-27 13:38:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-27 13:38:41 -0400 |
commit | 9b7ac03af3e7ceae7d1933db566ee407cfdef72d (patch) | |
tree | bd29b6da47cb08b846e05ce004f0e8d4008ed374 /synapse/storage/databases/main/appservice.py | |
parent | simple_search_list_txn should return None, not 0. (#8187) (diff) | |
download | synapse-9b7ac03af3e7ceae7d1933db566ee407cfdef72d.tar.xz |
Convert calls of async database methods to async (#8166)
Diffstat (limited to 'synapse/storage/databases/main/appservice.py')
-rw-r--r-- | synapse/storage/databases/main/appservice.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/storage/databases/main/appservice.py b/synapse/storage/databases/main/appservice.py index 77723f7d4d..92f56f1602 100644 --- a/synapse/storage/databases/main/appservice.py +++ b/synapse/storage/databases/main/appservice.py @@ -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} ) |