Commit Graph

122 Commits (ef1f8d4be6e970043b8283f5caa1ca764652ad56)

Author SHA1 Message Date
Erik Johnston ddf7979531 Add receipts_key to StreamToken 10 years ago
Erik Johnston 2f556e0c55 Fix typo 10 years ago
Erik Johnston 6f6ebd216d PEP8 10 years ago
Erik Johnston 73513ececc Documentation 10 years ago
Erik Johnston 1f24c2e589 Don't bother proxying lookups on _NotificationListener to underlying deferred 10 years ago
Erik Johnston 22049ea700 Refactor the notifier.wait_for_events code to be clearer. Add _NotifierUserStream.new_listener that accpets a token to avoid races. 10 years ago
Erik Johnston 050ebccf30 Fix notifier leak 10 years ago
Mark Haines 554c63ca60 Iterate over the user_streams not the user_ids 10 years ago
Mark Haines 88f1ea36ce Oops, get_rooms_for_user returns a namedtuple, not a room_id 10 years ago
Mark Haines ad31fa3040 Don't bother sorting by the room_stream_ids, it shouldn't matter which order they are notified in 10 years ago
Mark Haines 1e90715a3d Make sure the notifier stream token goes forward when it is updated. Sort the pending events by the correct room_stream_id 10 years ago
Mark Haines 0ad1c67234 Add some doc-strings to notifier 10 years ago
Mark Haines 084c365c3a Use the current token when timing out a notifier, make sure the user_id is a string in on_new_user_event 10 years ago
Mark Haines 3edd2d5c93 Fix v2 sync, update the last_notified_ms only if there was an active listener 10 years ago
Mark Haines 5e0c533672 Fix metric counter 10 years ago
Mark Haines f1b83d88a3 Discard unused NotifierUserStreams 10 years ago
Mark Haines 9af432257d Don't set a timer if there's already a result to return 10 years ago
Mark Haines df6db5c802 Don't bother checking for new events from a source if the stream token hasn't advanced for that source 10 years ago
Mark Haines 63878c0379 Don't bother checking for updates if the stream token hasn't advanced for a user 10 years ago
Mark Haines 2551b6645d Update the end_token correctly, otherwise the token doesn't advance and the client gets duplicate events 10 years ago
Mark Haines 5c75adff95 Add a NotifierUserStream to hold all the notification listeners for a user 10 years ago
Mark Haines e269c511f6 Don't bother passing the events to the notifier since it isn't using them 10 years ago
Mark Haines 5e3b254dc8 Use wait_for_events to implement 'get_events' 10 years ago
Erik Johnston 4ac1941592 PEP8 10 years ago
Erik Johnston 476899295f Change the way we do logging contexts so that they survive divergences 10 years ago
Erik Johnston 42c12c04f6 Remove some run_on_reactors 10 years ago
Erik Johnston e19f794fee Change from exception to warn 10 years ago
Mark Haines 1280a47fc6 Add comment 10 years ago
Mark Haines 23d285ad57 Unset the timer in the timeout callback so that we don't try to cancel it if it has been called 10 years ago
Mark Haines 6f9dea7483 SYN-339: Cancel the notifier timeout when the notifier fires 10 years ago
Erik Johnston 5bc41fe9f8 Move comment into docstring 10 years ago
Erik Johnston 638be5a6b9 Factor out loops into '_discard_if_notified' 10 years ago
Erik Johnston 830d07db82 Also perform paranoia checks in 'on_new_user_event' 10 years ago
Erik Johnston 65f5e4e3e4 Add paranoia checks to make sure that we evict stale NotificationListeners when we are about to process them 10 years ago
Erik Johnston 07d4041709 Fix bug where we didn't inform the NotificataionListeners about new rooms they have been subscribed to. This meant that the listeners didn't clean themselves up fully from all the dicts 10 years ago
Paul "LeoNerd" Evans 128cf2daf7 Appease pep8 10 years ago
Paul "LeoNerd" Evans 89ac1fa8ba Add a counter to track total number of events served by the notifier 10 years ago
Paul "LeoNerd" Evans b0cf867319 Use _ instead of . as a metric namespacing separator, for Prometheus 10 years ago
Paul "LeoNerd" Evans 6d146e15df Put some gauge metrics on the number of notifier listeners, and notified-on objects (users, rooms, appservices) 10 years ago
Paul "LeoNerd" Evans dc4b774f1e Rename rooms_to_listeners to room_to_listeners, for consistency with user_ and appservice_* 10 years ago
Kegan Dougal 1cc77145d4 Notify appservices of invites mid-poll. 10 years ago
Erik Johnston 72a4de2ce6 Use consumeErrors=True on all DeferredLists. 10 years ago
Kegan Dougal 51d63ac329 Glue AS work to general event notifications. Add more exception handling when poking ASes. 10 years ago
Mark Haines e020574d65 Fix Formatting 10 years ago
Mark Haines b19cf6a105 Wait for events if the incremental sync is empty and a timeout is given 10 years ago
Mark Haines dc70d1fef8 Only start the notifier timeout once we've had a chance to check for updates. Otherwise the timeout could fire while we are waiting for the database to return any updates it might have 10 years ago
Mark Haines adb04b1e57 Update copyright notices 10 years ago
Paul "LeoNerd" Evans 0c1deca574 Remember to hook up the typing event stream to the notifier as well 10 years ago
Mark Haines db9ce032a4 Fix pep8 codestyle warnings 10 years ago
Mark Haines 32090aee16 Add a few missing yields, Move deferred lists inside PreserveLoggingContext because they don't interact well with the logging contexts 10 years ago