diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-28 10:41:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-30 14:14:36 +0100 |
commit | 86780a8bc3eac566d2c03a601f84b5ccf5737ceb (patch) | |
tree | 196cf1307a234245d4d1642509f64a2f98c09ca5 /synapse/push | |
parent | Fix the logcontext handling in the cache wrappers (#2077) (diff) | |
download | synapse-86780a8bc3eac566d2c03a601f84b5ccf5737ceb.tar.xz |
Don't convert to deferreds when not necessary
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/push_tools.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/synapse/push/push_tools.py b/synapse/push/push_tools.py index 287df94b4f..6835f54e97 100644 --- a/synapse/push/push_tools.py +++ b/synapse/push/push_tools.py @@ -17,15 +17,12 @@ from twisted.internet import defer from synapse.push.presentable_names import ( calculate_room_name, name_from_member_event ) -from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred @defer.inlineCallbacks def get_badge_count(store, user_id): - invites, joins = yield preserve_context_over_deferred(defer.gatherResults([ - preserve_fn(store.get_invited_rooms_for_user)(user_id), - preserve_fn(store.get_rooms_for_user)(user_id), - ], consumeErrors=True)) + invites = yield store.get_invited_rooms_for_user(user_id) + joins = yield store.get_rooms_for_user(user_id) my_receipts_by_room = yield store.get_receipts_for_user( user_id, "m.read", |