Commit Graph

110 Commits (0862fed2a89723e8aa6a4df9f1dbad975a7fbffc)

Author SHA1 Message Date
Erik Johnston 0460406298 Don't do unecessary db ops in presence.get_state 10 years ago
Mark Haines 1a9a9abcc7 Add a cache for getting the presence list for a user 10 years ago
Mark Haines 106a3051b8 Remove spurious TODO comment 10 years ago
Mark Haines 7ae8afb7ef Removed unused 'is_visible' method 10 years ago
Mark Haines e01b825cc9 Clean up the presence_list checking logic a bit 10 years ago
Mark Haines e4c65b338d Speed up the get_pagination_rows as well 10 years ago
Mark Haines 591c4bf223 Cache the most recent serial for each room 10 years ago
Mark Haines e1150cac4b Move updating the serial and state of the presence cache into a single function 10 years ago
Mark Haines 755def8083 Add more doc string, reduce C+P boilerplate for getting room list 10 years ago
Mark Haines 415b158ce2 More whitespace 10 years ago
Mark Haines 0a4330cd5d Add some missed argument types, cleanup the whitespace a bit 10 years ago
Mark Haines 47ec693e29 More doc-strings 10 years ago
Mark Haines c5d1b4986b Remove unused arguments and doc PresenceHandler.push_update_to_clients 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 d7b3ac46f8 Revert "Improvement to performance of presence event stream handling" 10 years ago
Erik Johnston 2236ef6c92 Fix up leak. Add warnings. 10 years ago
Erik Johnston 476899295f Change the way we do logging contexts so that they survive divergences 10 years ago
Paul "LeoNerd" Evans 45543028bb Use the presence cachemap ordering to early-abort the iteration loop 10 years ago
Paul "LeoNerd" Evans f683b5de47 Store presence cachemap in an ordered dict, so that the newer serials will be at the end 10 years ago
Erik Johnston a6e62cf6d0 Fix off by one in presence token handling 10 years ago
Erik Johnston 1783c7ca92 Ensure we never miss any presence updates 10 years ago
Erik Johnston 0126ef7f3c Fix typo 10 years ago
Erik Johnston d98edb548a Ensure the serial returned by presence is always an integer 10 years ago
Paul "LeoNerd" Evans e1e5e53127 Remove users from the remote_offline_serials list (and clean up empty elements) when they go online again 10 years ago
Paul "LeoNerd" Evans b3bda8a75f Don't let the remote offline serial list grow arbitrarily large 10 years ago
Paul "LeoNerd" Evans 8a785c3006 Store a list of the presence serial number at which remote users went offline, so that when we delete them from the cachemap, we can still synthesize OFFLINE events for them (SYN-261) 10 years ago
Paul "LeoNerd" Evans 191f7f09ce Generate presence event-stream JSON structures directly 10 years ago
Paul "LeoNerd" Evans ed008e85a8 Reduce activity timer granularity to avoid too many quick updates (SYN-247) 10 years ago
Paul "LeoNerd" Evans 128cf2daf7 Appease pep8 10 years ago
Paul "LeoNerd" Evans b0cf867319 Use _ instead of . as a metric namespacing separator, for Prometheus 10 years ago
Paul "LeoNerd" Evans 59c448f074 Add a scalar gauge metric on the size of the presence user cachemap 10 years ago
Erik Johnston 8e28db5cc9 Change room handlers get_rooms_for_user to get_joined_rooms_for_user. This uses the a storage api that is cached. 10 years ago
Erik Johnston 72a4de2ce6 Use consumeErrors=True on all DeferredLists. 10 years ago
Mark Haines 84a769cdb7 Fix code-style 10 years ago
Mark Haines b085fac735 Code-style fixes 10 years ago
David Baker 273b12729b Reset badge count to zero when last active time is bumped 10 years ago
Mark Haines 5759bec43c Replace hs.parse_userid with UserID.from_string 10 years ago
Mark Haines adb04b1e57 Update copyright notices 10 years ago
Paul "LeoNerd" Evans f5d2514fc0 @log_function on PresenceStream's get_new_events_for_user() 10 years ago
Paul "LeoNerd" Evans 52f1d3c886 Store any incoming presence push in the local cache anyway, even if there's no interested observers (yet *hint*) (SYN-115) 10 years ago
Paul "LeoNerd" Evans 274d137b00 Extra verbosity on logging of received presence info 10 years ago
Erik Johnston 9d53228158 Change DomainSpecificString so that it doesn't use a HomeServer object 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
Paul "LeoNerd" Evans 03dc63f6c8 Initialise UserPresenceCache instances to always contain a 'presence' key 10 years ago
Paul "LeoNerd" Evans 759db7d7d5 Added ability to .get_state() from the PresenceHandler by returning a complete m.presence event 10 years ago
Paul "LeoNerd" Evans 4c18e08036 Don't expect all _user_cachemap entries to definitely contain a "last_active" key 10 years ago
Mark Haines 7d709542ca Fix pep8 warnings 10 years ago
Paul "LeoNerd" Evans b1ee6fd7ed Fix an off-by-one bug in presence event stream pagination; this might be responsible for any number of bug reports 10 years ago
Paul "LeoNerd" Evans d6bcffa929 Construct a source-specific 'SourcePaginationConfig' to pass into get_pagination_rows; meaning each source doesn't have to care about its own name any more 10 years ago
Paul "LeoNerd" Evans c5a25f610a Remove redundant (and incorrect) presence pagination fetching code 10 years ago