mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-09 13:41:55 +00:00
Don't be too enthusiatic with defer.gatherResults
This commit is contained in:
parent
b2c7bd4b09
commit
ffdb8c3828
@ -405,10 +405,14 @@ class MessageHandler(BaseHandler):
|
||||
except:
|
||||
logger.exception("Failed to get snapshot")
|
||||
|
||||
yield defer.gatherResults(
|
||||
[handle_room(e) for e in room_list],
|
||||
consumeErrors=True
|
||||
).addErrback(unwrapFirstError)
|
||||
# Only do N rooms at once
|
||||
n = 5
|
||||
d_list = [handle_room(e) for e in room_list]
|
||||
for ds in [d_list[i:i + n] for i in range(0, len(d_list), n)]:
|
||||
yield defer.gatherResults(
|
||||
ds,
|
||||
consumeErrors=True
|
||||
).addErrback(unwrapFirstError)
|
||||
|
||||
ret = {
|
||||
"rooms": rooms_ret,
|
||||
|
Loading…
Reference in New Issue
Block a user