defer.gatherResults loop
This commit is contained in:
parent
fec4485e28
commit
619a21812b
|
@ -103,12 +103,18 @@ class StateStore(SQLBaseStore):
|
||||||
for row in rows
|
for row in rows
|
||||||
]
|
]
|
||||||
|
|
||||||
for vals in states.values():
|
@defer.inlineCallbacks
|
||||||
|
def c(vals):
|
||||||
vals[:] = yield self.runInteraction(
|
vals[:] = yield self.runInteraction(
|
||||||
"_get_state_groups_ev",
|
"_get_state_groups_ev",
|
||||||
fetch_events, vals
|
fetch_events, vals
|
||||||
)
|
)
|
||||||
|
|
||||||
|
yield defer.gatherResults(
|
||||||
|
[c(vals) for vals in states.values()],
|
||||||
|
consumeErrors=True,
|
||||||
|
)
|
||||||
|
|
||||||
defer.returnValue(states)
|
defer.returnValue(states)
|
||||||
|
|
||||||
def _store_state_groups_txn(self, txn, event, context):
|
def _store_state_groups_txn(self, txn, event, context):
|
||||||
|
|
Loading…
Reference in New Issue