summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-05-15 15:20:05 +0100
committerErik Johnston <erik@matrix.org>2015-05-15 15:20:05 +0100
commitacb12cc811d7ce7cb3c5b6544ed28f7d6592ef33 (patch)
treefe4aa0e296c6530072b50e70a0c983fbfe545023 /synapse/storage/state.py
parentRemove more debug logging (diff)
downloadsynapse-acb12cc811d7ce7cb3c5b6544ed28f7d6592ef33.tar.xz
Make store.get_current_state fetch events asyncly
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py
index 3f5642642d..b3f2a4dfa1 100644
--- a/synapse/storage/state.py
+++ b/synapse/storage/state.py
@@ -159,11 +159,12 @@ class StateStore(SQLBaseStore):
                 args = (room_id, )
 
             txn.execute(sql, args)
-            results = self.cursor_to_dict(txn)
+            results = txn.fetchall()
 
-            return self._parse_events_txn(txn, results)
+            return [r[0] for r in results]
 
-        events = yield self.runInteraction("get_current_state", f)
+        event_ids = yield self.runInteraction("get_current_state", f)
+        events = yield self._get_events(event_ids)
         defer.returnValue(events)