diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-05-13 13:42:21 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-05-13 13:42:21 +0100 |
commit | 63878c03794d33a8767425e114845159e5c1cb9a (patch) | |
tree | 0de6af26d7acf38eb0de25adddd0fbe83e58642b /synapse/handlers/_base.py | |
parent | Merge branch 'notifier_unify' into notifier_performance (diff) | |
download | synapse-63878c03794d33a8767425e114845159e5c1cb9a.tar.xz |
Don't bother checking for updates if the stream token hasn't advanced for a user
Diffstat (limited to 'synapse/handlers/_base.py')
-rw-r--r-- | synapse/handlers/_base.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py index ddc5c21e7d..833ff41377 100644 --- a/synapse/handlers/_base.py +++ b/synapse/handlers/_base.py @@ -105,7 +105,9 @@ class BaseHandler(object): if not suppress_auth: self.auth.check(event, auth_events=context.current_state) - yield self.store.persist_event(event, context=context) + (event_stream_id, max_stream_id) = yield self.store.persist_event( + event, context=context + ) federation_handler = self.hs.get_handlers().federation_handler @@ -142,7 +144,8 @@ class BaseHandler(object): with PreserveLoggingContext(): # Don't block waiting on waking up all the listeners. notify_d = self.notifier.on_new_room_event( - event, extra_users=extra_users + event, event_stream_id, max_stream_id, + extra_users=extra_users ) def log_failure(f): |