summary refs log tree commit diff
path: root/synapse/storage/databases/main/presence.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-14 07:24:26 -0400
committerGitHub <noreply@github.com>2020-08-14 07:24:26 -0400
commit894dae74fe8e79911c3c001c8b84620ef3985bf6 (patch)
tree3ba58a280c6db5eb89e116ef528061592ce8f987 /synapse/storage/databases/main/presence.py
parentRemove a space at the start of a changelog entry. (diff)
downloadsynapse-894dae74fe8e79911c3c001c8b84620ef3985bf6.tar.xz
Convert misc database code to async (#8087)
Diffstat (limited to 'synapse/storage/databases/main/presence.py')
-rw-r--r--synapse/storage/databases/main/presence.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/synapse/storage/databases/main/presence.py b/synapse/storage/databases/main/presence.py
index 59ba12820a..fd213d2dfd 100644
--- a/synapse/storage/databases/main/presence.py
+++ b/synapse/storage/databases/main/presence.py
@@ -130,13 +130,10 @@ class PresenceStore(SQLBaseStore):
         raise NotImplementedError()
 
     @cachedList(
-        cached_method_name="_get_presence_for_user",
-        list_name="user_ids",
-        num_args=1,
-        inlineCallbacks=True,
+        cached_method_name="_get_presence_for_user", list_name="user_ids", num_args=1,
     )
-    def get_presence_for_users(self, user_ids):
-        rows = yield self.db_pool.simple_select_many_batch(
+    async def get_presence_for_users(self, user_ids):
+        rows = await self.db_pool.simple_select_many_batch(
             table="presence_stream",
             column="user_id",
             iterable=user_ids,