diff options
author | Erik Johnston <erik@matrix.org> | 2015-08-12 16:02:05 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-08-12 16:02:05 +0100 |
commit | a7eeb34c64d828539dd6799f2347371a8eabae73 (patch) | |
tree | 550d879dbe86234e871747a87c833314e9108ef2 /synapse/handlers/message.py | |
parent | Use list comprehension instead of filter (diff) | |
download | synapse-a7eeb34c64d828539dd6799f2347371a8eabae73.tar.xz |
Simplify staggered deferred lists
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r-- | synapse/handlers/message.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index 2c4af8dc97..8a9e6cf6ca 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -406,9 +406,9 @@ class MessageHandler(BaseHandler): # 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)]: + for i in range(0, len(d_list), n): yield defer.gatherResults( - ds, + d_list[i:i + n], consumeErrors=True ).addErrback(unwrapFirstError) |