diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-05-12 15:23:50 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-05-12 15:23:50 +0100 |
commit | a6fb2aa2a5a5837d77bed8813f9e59bfe6be8999 (patch) | |
tree | 154ff4598b9740104abd5cf465c98cf2797c5406 /synapse/notifier.py | |
parent | Merge pull request #149 from matrix-org/erikj/backfill (diff) | |
parent | Make distributer.fire work as it did (diff) | |
download | synapse-a6fb2aa2a5a5837d77bed8813f9e59bfe6be8999.tar.xz |
Merge pull request #144 from matrix-org/erikj/logging_context
Preserving logging contexts
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r-- | synapse/notifier.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index 78eb28e4b2..7282dfd7f3 100644 --- a/synapse/notifier.py +++ b/synapse/notifier.py @@ -16,7 +16,6 @@ from twisted.internet import defer from synapse.util.logutils import log_function -from synapse.util.logcontext import PreserveLoggingContext from synapse.types import StreamToken import synapse.metrics @@ -223,11 +222,10 @@ class Notifier(object): def eb(failure): logger.exception("Failed to notify listener", failure) - with PreserveLoggingContext(): - yield defer.DeferredList( - [notify(l).addErrback(eb) for l in listeners], - consumeErrors=True, - ) + yield defer.DeferredList( + [notify(l).addErrback(eb) for l in listeners], + consumeErrors=True, + ) @defer.inlineCallbacks @log_function @@ -298,11 +296,10 @@ class Notifier(object): failure.getTracebackObject()) ) - with PreserveLoggingContext(): - yield defer.DeferredList( - [notify(l).addErrback(eb) for l in listeners], - consumeErrors=True, - ) + yield defer.DeferredList( + [notify(l).addErrback(eb) for l in listeners], + consumeErrors=True, + ) @defer.inlineCallbacks def wait_for_events(self, user, rooms, filter, timeout, callback): |