summary refs log tree commit diff
path: root/synapse/storage/databases/main/stats.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-11/+16
|
* Remove more usages of cursor_to_dict. (#16551)Patrick Cloke2023-10-261-5/+10
| | | Mostly to improve type safety.
* Convert simple_select_many_batch, simple_select_many_txn to tuples. (#16444)Patrick Cloke2023-10-111-17/+20
|
* Filter locked users in the admin API (#16328)Hanadi2023-09-181-0/+1
| | | | Co-authored-by: Hanadi Tamimi <hanadi.tamimi@sdui.de>
* Add last_seen_ts to the admin users API (#16218)Mathieu Velten2023-09-041-0/+1
|
* Run pyupgrade for python 3.7 & 3.8. (#16110)Patrick Cloke2023-08-151-2/+1
|
* Actually stop reading from column `user_id` of tables `profiles` (#15955)Shay2023-07-231-2/+2
|
* Bump ruff from 0.0.252 to 0.0.259 (#15328)dependabot[bot]2023-03-281-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump ruff from 0.0.252 to 0.0.259 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.252 to 0.0.259. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.252...v0.0.259) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Fix new warnings * Mypy * Newsfile --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Erik Johnston <erik@matrix.org>
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-1/+1
|
* Add helper to parse an enum from query args & use it. (#14956)Patrick Cloke2023-02-011-3/+3
| | | | | | | | The `parse_enum` helper pulls an enum value from the query string (by delegating down to the parse_string helper with values generated from the enum). This is used to pull out "f" and "b" in most places and then we thread the resulting Direction enum throughout more code.
* Skip processing stats for broken rooms. (#14873)Patrick Cloke2023-01-231-1/+12
| | | | | | | * Skip processing stats for broken rooms. * Newsfragment * Use a custom exception.
* Require SQLite >= 3.27.0 (#13760)David Robertson2022-09-091-52/+34
|
* Implement MSC3827: Filtering of `/publicRooms` by room type (#13031)Šimon Brandner2022-06-291-2/+8
| | | | Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
* Add desc to `get_earliest_token_for_stats` (#13085)Erik Johnston2022-06-161-0/+1
|
* Replace noop background updates with DELETE. (#12954)Patrick Cloke2022-06-131-5/+0
| | | | Removes the `register_noop_background_update` and deletes the background updates directly in a delta file.
* Add some type hints to datastore. (#12255)Dirk Klimpel2022-03-281-1/+1
|
* Add type hints to `synapse/storage/databases/main/stats.py` (#11653)Dirk Klimpel2021-12-291-41/+53
|
* Remove redundant `COALESCE()`s around `COUNT()`s in database queries (#11570)Sean Quah2021-12-141-1/+1
| | | | | `COUNT()` never returns `NULL`. A `COUNT(*)` over 0 rows is 0 and a `COUNT(NULL)` is also 0.
* Type hint the constructors of the data store classes (#11555)Sean Quah2021-12-131-2/+7
|
* Add type hints for most `HomeServer` parameters (#11095)Sean Quah2021-10-221-2/+5
|
* Use direct references for configuration variables (part 5). (#10897)Patrick Cloke2021-09-241-1/+1
|
* 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-2/+2
|
* Add `creation_ts` to list users admin API (#10448)Dirk Klimpel2021-07-221-0/+2
| | | Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Add type hints to additional servlet functions (#10437)Patrick Cloke2021-07-211-1/+1
| | | | | | | | | Improves type hints for: * parse_{boolean,integer} * parse_{boolean,integer}_from_args * parse_json_{value,object}_from_request And fixes any incorrect calls that resulted from unknown types.
* Add a return type to parse_string. (#10438)Patrick Cloke2021-07-211-1/+1
| | | | And set the required attribute in a few places which will error if a parameter is not provided.
* Fix the user directory becoming broken (and noisy errors being logged) when ↵reivilibre2021-07-091-2/+6
| | | | | knocking and room statistics are in use. (#10344) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
* Remove functionality associated with unused historical stats tables (#9721)Cristina2021-07-081-290/+1
| | | Fixes #9602
* Implement knock feature (#6739)Sorunome2021-06-091-0/+1
| | | | | | 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>`
* Add `order_by` to list user admin API (#9691)Dirk Klimpel2021-04-011-3/+22
|
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-1/+3
| | | | | | | - 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-9/+13
| | | | With this change all handlers except the e2e_* ones have type hints enabled.
* Add an admin API for users' media statistics (#8700)Dirk Klimpel2020-11-051-0/+127
| | | | | | | | Add `GET /_synapse/admin/v1/statistics/users/media` to get statisics about local media usage by users. Related to #6094 It is the first API for statistics. Goal is to avoid/reduce usage of sql queries like [Wiki analyzing Synapse](https://github.com/matrix-org/synapse/wiki/SQL-for-analyzing-Synapse-PostgreSQL-database-stats) Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Fix missing null character check on guest_access room stateAndrew Morgan2020-09-221-0/+2
| | | | | | | | | | | | | | | When updating room_stats_state, we try to check for null bytes slipping in to the content for state events. It turns out we had added guest_access as a field to room_stats_state without including it in the null byte check. Lo and behold, a null byte in a m.room.guest_access event then breaks room_stats_state updates. This PR adds the check for guest_access. A further PR will improve this function so that this hopefully does not happen again in future.
* Simplify super() calls to Python 3 syntax. (#8344)Patrick Cloke2020-09-181-1/+1
| | | | | | | This converts calls like super(Foo, self) -> super(). Generated with: sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
* Rename 'populate_stats_process_rooms_2' background job back to ↵Andrew Morgan2020-09-081-30/+6
| | | | | | | 'populate_stats_process_rooms' again (#8243) Fixes https://github.com/matrix-org/synapse/issues/8238 Alongside the delta file, some changes were also necessary to the codebase to remove references to the now defunct `populate_stats_process_rooms_2` background job. Thankfully the latter doesn't seem to have made it into any documentation yet :)
* Do not try to store invalid data in the stats table (#8226)Patrick Cloke2020-09-021-8/+26
|
* Convert stats and related calls to async/await (#8192)Patrick Cloke2020-08-271-40/+42
|
* Convert calls of async database methods to async (#8166)Patrick Cloke2020-08-271-5/+5
|
* Convert simple_select_one and simple_select_one_onecol to async (#8162)Patrick Cloke2020-08-261-5/+5
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-0/+886