diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-12 16:37:50 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-12 16:37:50 +0100 |
commit | cffe6057fb59a4db622132a84b5ef88cf81f6bfd (patch) | |
tree | 173ebcd9a8c7c04ee3a4f733995a47c515e9c81a /synapse/notifier.py | |
parent | Merge branch 'notifier_unify' into notifier_performance (diff) | |
parent | Merge branch 'develop' into notifier_unify (diff) | |
download | synapse-cffe6057fb59a4db622132a84b5ef88cf81f6bfd.tar.xz |
Merge branch 'notifier_unify' into notifier_performance
Conflicts: synapse/notifier.py
Diffstat (limited to '')
-rw-r--r-- | synapse/notifier.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py index 7b9bae1056..214a2b28ca 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.util.async import run_on_reactor from synapse.types import StreamToken import synapse.metrics @@ -196,12 +195,11 @@ class Notifier(object): logger.debug("on_new_room_event listeners %s", user_streams) - with PreserveLoggingContext(): - for user_stream in user_streams: - try: - user_stream.notify(new_token) - except: - logger.exception("Failed to notify listener") + for user_stream in user_streams: + try: + user_stream.notify(new_token) + except: + logger.exception("Failed to notify listener") @defer.inlineCallbacks @log_function @@ -223,12 +221,11 @@ class Notifier(object): for room in rooms: user_streams |= self.room_to_user_streams.get(room, set()) - with PreserveLoggingContext(): - for user_stream in user_streams: - try: - user_streams.notify(new_token) - except: - logger.exception("Failed to notify listener") + for user_stream in user_streams: + try: + user_streams.notify(new_token) + except: + logger.exception("Failed to notify listener") @defer.inlineCallbacks def wait_for_events(self, user, rooms, timeout, callback, |