diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-08-25 18:34:46 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-08-25 18:34:46 +0100 |
commit | ab34fdecb777b057a0ec307328f309bb2bdee05c (patch) | |
tree | 541dc61435b893897e7a46d8f0a69443e18233d7 /synapse/push/pusherpool.py | |
parent | Add some TODOs (diff) | |
parent | Merge pull request #1041 from matrix-org/paul/third-party-lookup (diff) | |
download | synapse-ab34fdecb777b057a0ec307328f309bb2bdee05c.tar.xz |
Merge branch 'develop' into markjh/direct_to_device
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") |