summary refs log tree commit diff
path: root/synapse/handlers/stats.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use direct references for configuration variables (part 5). (#10897)Patrick Cloke2021-09-241-1/+1
|
* Require type hints in the handlers module. (#10831)Patrick Cloke2021-09-201-1/+1
| | | | | | | Adds missing type hints to methods in the synapse.handlers module and requires all methods to have type hints there. This also removes the unused construct_auth_difference method from the FederationHandler.
* Use direct references for some configuration variables (#10798)Patrick Cloke2021-09-131-1/+1
| | | | Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
* Add a constant for m.federate. (#10775)Patrick Cloke2021-09-081-1/+1
|
* Move `maybe_kick_guest_users` out of `BaseHandler` (#10744)Richard van der Hoff2021-09-061-2/+4
| | | This is part of my ongoing war against BaseHandler. I've moved kick_guest_users into RoomMemberHandler (since it calls out to that handler anyway), and split maybe_kick_guest_users into the two places it is called.
* Use inline type hints in `handlers/` and `rest/`. (#10382)Jonathan de Jong2021-07-161-5/+5
|
* Remove functionality associated with unused historical stats tables (#9721)Cristina2021-07-081-27/+0
| | | Fixes #9602
* Implement knock feature (#6739)Sorunome2021-06-091-1/+6
| | | | | | This PR aims to implement the knock feature as proposed in https://github.com/matrix-org/matrix-doc/pull/2403 Signed-off-by: Sorunome mail@sorunome.de Signed-off-by: Andrew Morgan andrewm@element.io
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Import HomeServer from the proper module. (#9665)Patrick Cloke2021-03-231-1/+1
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-2/+1
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Add type hints to various handlers. (#9223)Patrick Cloke2021-01-261-16/+23
| | | | With this change all handlers except the e2e_* ones have type hints enabled.
* Allow background tasks to be run on a separate worker. (#8369)Patrick Cloke2020-10-021-1/+1
|
* Prevent join->join membership transitions changing member count (#7977)Andrew Morgan2020-08-031-1/+1
| | | | | | | | | | | `StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc. However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information. This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point. Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update). Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
* Convert user directory handler and related classes to async/await. (#7640)Patrick Cloke2020-06-051-27/+20
|
* Reduce amount of logging at INFO level. (#6862)Erik Johnston2020-02-061-1/+1
| | | | | | | | A lot of the things we log at INFO are now a bit superfluous, so lets make them DEBUG logs to reduce the amount we log by default. Co-Authored-By: Brendan Abolivier <babolivier@matrix.org> Co-authored-by: Brendan Abolivier <github@brendanabolivier.com>
* Fix detecting unknown devices from remote encrypted events. (#6848)Erik Johnston2020-02-041-1/+1
| | | | | | | | We were looking at the wrong event type (`m.room.encryption` vs `m.room.encrypted`). Also fixup the duplicate `EvenTypes` entries. Introduced in #6776.
* Update black to 19.10b0 (#6304)Amber Brown2019-11-011-1/+4
| | | * update version of black and also fix the mypy config being overridden
* Remove repeated calls to config.stats_enabled.Erik Johnston2019-10-251-1/+3
| | | | | Turns out that fetching variables from the config object is expensive, so doing it once at startup avoids unnecessary work.
* Fix races in room stats (and other) updates. (#6187)Richard van der Hoff2019-10-101-5/+7
| | | | | | | Hopefully this will fix the occasional failures we were seeing in the room directory. The problem was that events are not necessarily persisted (and `current_state_delta_stream` updated) in the same order as their stream_id. So for instance current_state_delta 9 might be persisted *before* current_state_delta 8. Then, when the room stats saw stream_id 9, it assumed it had done everything up to 9, and never came back to do stream_id 8. We can solve this easily by only processing up to the stream_id where we know all events have been persisted.
* add some logging to the rooms stats updates, to try to track down a flaky ↵Richard van der Hoff2019-10-071-0/+1
| | | | test (#6167)
* Fix race condition in room stats. (#6029)Erik Johnston2019-09-171-4/+10
| | | | | Broke in #5971 Basically the bug is that if get_current_state_deltas returns no new updates and we then take the max pos, its possible that we miss an update that happens in between the two calls. (e.g. get_current_state_deltas looks up to stream pos 5, then an event persists and so getting the max stream pos returns 6, meaning that next time we check for things with a stream pos bigger than 6)
* Correctly handle non-bool m.federate flagErik Johnston2019-09-061-1/+3
|
* Fix and refactor room and user stats (#5971)Erik Johnston2019-09-041-175/+132
| | | Previously the stats were not being correctly populated.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-3/+3
|
* Run Black. (#5482)Amber Brown2019-06-201-1/+1
|
* Fix background updates to handle redactions/rejections (#5352)Erik Johnston2019-06-061-5/+13
| | | | | | | | * Fix background updates to handle redactions/rejections In background updates based on current state delta stream we need to handle that we may not have all the events (or at least that `get_events` may raise an exception).
* Room Statistics (#4338)Amber Brown2019-05-211-0/+325