diff options
author | Sean Quah <seanq@element.io> | 2021-10-20 11:06:51 +0100 |
---|---|---|
committer | Sean Quah <seanq@element.io> | 2021-10-20 11:06:51 +0100 |
commit | c59b9711f316583e81d8c1f40eb49000d9e0e690 (patch) | |
tree | 014a40e0334dc4dde84accc8ac1b23db5194202f /synapse/storage | |
parent | Merge branch 'release-v1.45' of github.com:matrix-org/synapse into matrix-org... (diff) | |
parent | Revert change to counting of deactivated users towards the monthly active use... (diff) | |
download | synapse-c59b9711f316583e81d8c1f40eb49000d9e0e690.tar.xz |
Merge branch 'release-v1.45' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/databases/main/monthly_active_users.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/synapse/storage/databases/main/monthly_active_users.py b/synapse/storage/databases/main/monthly_active_users.py index ec4d47a560..a14ac03d4b 100644 --- a/synapse/storage/databases/main/monthly_active_users.py +++ b/synapse/storage/databases/main/monthly_active_users.py @@ -354,27 +354,3 @@ class MonthlyActiveUsersStore(MonthlyActiveUsersWorkerStore): await self.upsert_monthly_active_user(user_id) elif now - last_seen_timestamp > LAST_SEEN_GRANULARITY: await self.upsert_monthly_active_user(user_id) - - async def remove_deactivated_user_from_mau_table(self, user_id: str) -> None: - """ - Removes a deactivated user from the monthly active user - table and resets affected caches. - - Args: - user_id(str): the user_id to remove - """ - - rows_deleted = await self.db_pool.simple_delete( - table="monthly_active_users", - keyvalues={"user_id": user_id}, - desc="simple_delete", - ) - - if rows_deleted != 0: - await self.invalidate_cache_and_stream( - "user_last_seen_monthly_active", (user_id,) - ) - await self.invalidate_cache_and_stream("get_monthly_active_count", ()) - await self.invalidate_cache_and_stream( - "get_monthly_active_count_by_service", () - ) |