diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-11-20 16:24:00 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-11-20 16:24:00 +0000 |
commit | 32090aee169aafc9da4efa176b50a5fc8ede68d2 (patch) | |
tree | c7606c2aecdce27c83e0e2dc95393a95761c7934 /synapse/handlers/events.py | |
parent | Merge branch 'master' into develop (diff) | |
download | synapse-32090aee169aafc9da4efa176b50a5fc8ede68d2.tar.xz |
Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r-- | synapse/handlers/events.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py index 4993c92b74..d59221a4fb 100644 --- a/synapse/handlers/events.py +++ b/synapse/handlers/events.py @@ -56,7 +56,7 @@ class EventStreamHandler(BaseHandler): self.clock.cancel_call_later( self._stop_timer_per_user.pop(auth_user)) else: - self.distributor.fire( + yield self.distributor.fire( "started_user_eventstream", auth_user ) self._streams_per_user[auth_user] += 1 @@ -65,8 +65,10 @@ class EventStreamHandler(BaseHandler): pagin_config.from_token = None rm_handler = self.hs.get_handlers().room_member_handler + logger.debug("BETA") room_ids = yield rm_handler.get_rooms_for_user(auth_user) + logger.debug("ALPHA") with PreserveLoggingContext(): events, tokens = yield self.notifier.get_events_for( auth_user, room_ids, pagin_config, timeout @@ -93,7 +95,7 @@ class EventStreamHandler(BaseHandler): logger.debug( "_later stopped_user_eventstream %s", auth_user ) - self.distributor.fire( + yield self.distributor.fire( "stopped_user_eventstream", auth_user ) del self._stop_timer_per_user[auth_user] |