mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-29 18:16:12 -05:00
Make store.get_current_state fetch events asyncly
This commit is contained in:
parent
d62dee7eae
commit
acb12cc811
@ -594,7 +594,6 @@ class EventsStore(SQLBaseStore):
|
|||||||
],
|
],
|
||||||
consumeErrors=True
|
consumeErrors=True
|
||||||
)
|
)
|
||||||
logger.debug("gatherResults after")
|
|
||||||
|
|
||||||
defer.returnValue({
|
defer.returnValue({
|
||||||
e.event_id: e
|
e.event_id: e
|
||||||
|
@ -159,11 +159,12 @@ class StateStore(SQLBaseStore):
|
|||||||
args = (room_id, )
|
args = (room_id, )
|
||||||
|
|
||||||
txn.execute(sql, args)
|
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)
|
defer.returnValue(events)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user