diff options
author | Erik Johnston <erik@matrix.org> | 2016-08-24 14:28:57 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-08-24 14:28:57 +0100 |
commit | 90d5983d7afa89a4431fea053512190ae83c8f3a (patch) | |
tree | 6c86dd3497030f7e9b629264e210e05a6ea1ce76 /synapse/push/pusherpool.py | |
parent | Bump changelog and version (diff) | |
parent | Merge pull request #1042 from matrix-org/erikj/preserve_log_contexts (diff) | |
download | synapse-90d5983d7afa89a4431fea053512190ae83c8f3a.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.17.1
Diffstat (limited to 'synapse/push/pusherpool.py')
-rw-r--r-- | synapse/push/pusherpool.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 54c0f1b849..3837be523d 100644 --- a/synapse/push/pusherpool.py +++ b/synapse/push/pusherpool.py @@ -17,7 +17,7 @@ from twisted.internet import defer import pusher -from synapse.util.logcontext import preserve_fn +from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred from synapse.util.async import run_on_reactor import logging @@ -130,10 +130,12 @@ class PusherPool: if u in self.pushers: for p in self.pushers[u].values(): deferreds.append( - p.on_new_notifications(min_stream_id, max_stream_id) + preserve_fn(p.on_new_notifications)( + min_stream_id, max_stream_id + ) ) - yield defer.gatherResults(deferreds) + yield preserve_context_over_deferred(defer.gatherResults(deferreds)) except: logger.exception("Exception in pusher on_new_notifications") @@ -155,10 +157,10 @@ class PusherPool: if u in self.pushers: for p in self.pushers[u].values(): deferreds.append( - p.on_new_receipts(min_stream_id, max_stream_id) + preserve_fn(p.on_new_receipts)(min_stream_id, max_stream_id) ) - yield defer.gatherResults(deferreds) + yield preserve_context_over_deferred(defer.gatherResults(deferreds)) except: logger.exception("Exception in pusher on_new_receipts") |