diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-11-14 11:22:42 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-11-14 11:22:42 +0000 |
commit | 7e6fa29cb5ba1abd8b4f3873b0ef171c7c8aba26 (patch) | |
tree | fefec86e319c859109830b7e1a92dfb07574b90d /synapse/push | |
parent | Merge pull request #2668 from turt2live/travis/whoami (diff) | |
download | synapse-7e6fa29cb5ba1abd8b4f3873b0ef171c7c8aba26.tar.xz |
Remove preserve_context_over_{fn, deferred}
Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off.
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/pusherpool.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 7c069b662e..34cb108dcb 100644 --- a/synapse/push/pusherpool.py +++ b/synapse/push/pusherpool.py @@ -17,7 +17,7 @@ from twisted.internet import defer from .pusher import PusherFactory -from synapse.util.logcontext import preserve_fn, preserve_context_over_deferred +from synapse.util.logcontext import make_deferred_yieldable, preserve_fn from synapse.util.async import run_on_reactor import logging @@ -136,7 +136,7 @@ class PusherPool: ) ) - yield preserve_context_over_deferred(defer.gatherResults(deferreds)) + yield make_deferred_yieldable(defer.gatherResults(deferreds)) except Exception: logger.exception("Exception in pusher on_new_notifications") @@ -161,7 +161,7 @@ class PusherPool: preserve_fn(p.on_new_receipts)(min_stream_id, max_stream_id) ) - yield preserve_context_over_deferred(defer.gatherResults(deferreds)) + yield make_deferred_yieldable(defer.gatherResults(deferreds)) except Exception: logger.exception("Exception in pusher on_new_receipts") |