Remove spurious PreserveLoggingContext

In `on_new_room_event`, remove `PreserveLoggingContext` - we can call its
subroutines with the logcontext set.
This commit is contained in:
Richard van der Hoff 2017-04-03 15:42:38 +01:00
parent feb496056e
commit 65e1683680

View File

@ -215,13 +215,12 @@ class Notifier(object):
until all previous events have been persisted before notifying until all previous events have been persisted before notifying
the client streams. the client streams.
""" """
with PreserveLoggingContext(): self.pending_new_room_events.append((
self.pending_new_room_events.append(( room_stream_id, event, extra_users
room_stream_id, event, extra_users ))
)) self._notify_pending_new_room_events(max_room_stream_id)
self._notify_pending_new_room_events(max_room_stream_id)
self.notify_replication() self.notify_replication()
def _notify_pending_new_room_events(self, max_room_stream_id): def _notify_pending_new_room_events(self, max_room_stream_id):
"""Notify for the room events that were queued waiting for a previous """Notify for the room events that were queued waiting for a previous