diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2020-06-19 16:14:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 16:14:37 +0100 |
commit | 6708163271b0e274c3c0106b31e8fe27a50b48df (patch) | |
tree | 2eb5503b1d436513187fa40b1fb565302fb89abd /synapse/rest | |
parent | Merge pull request #45 from matrix-org/dinsic-release-v1.14.x (diff) | |
download | synapse-6708163271b0e274c3c0106b31e8fe27a50b48df.tar.xz |
Performance improvements to marking expired users as inactive (#47)
This is a performance-related improvement to #13, which queried and hid active *and* already inactive users, one-by-one. This PR updates the code to query only **active**, expired users, all at once, and then mark them as inactive, all at once.
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/account_data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/account_data.py b/synapse/rest/client/v2_alpha/account_data.py index ddb011d864..d31ec7c29d 100644 --- a/synapse/rest/client/v2_alpha/account_data.py +++ b/synapse/rest/client/v2_alpha/account_data.py @@ -55,7 +55,7 @@ class AccountDataServlet(RestServlet): if account_data_type == "im.vector.hide_profile": user = UserID.from_string(user_id) hide_profile = body.get("hide_profile") - await self._profile_handler.set_active(user, not hide_profile, True) + await self._profile_handler.set_active([user], not hide_profile, True) max_id = await self.store.add_account_data_for_user( user_id, account_data_type, body |