mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 05:11:59 +00:00
Simplify staggered deferred lists
This commit is contained in:
parent
f7e2f981ea
commit
a7eeb34c64
@ -406,9 +406,9 @@ class MessageHandler(BaseHandler):
|
|||||||
# Only do N rooms at once
|
# Only do N rooms at once
|
||||||
n = 5
|
n = 5
|
||||||
d_list = [handle_room(e) for e in room_list]
|
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)]:
|
for i in range(0, len(d_list), n):
|
||||||
yield defer.gatherResults(
|
yield defer.gatherResults(
|
||||||
ds,
|
d_list[i:i + n],
|
||||||
consumeErrors=True
|
consumeErrors=True
|
||||||
).addErrback(unwrapFirstError)
|
).addErrback(unwrapFirstError)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user