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/handlers/register.py | |
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/handlers/register.py')
-rw-r--r-- | synapse/handlers/register.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index c7e3861054..8f9841117a 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -281,7 +281,7 @@ class RegistrationHandler(BaseHandler): yield self.store.add_account_data_for_user( user_id, "im.vector.hide_profile", {"hide_profile": True} ) - yield self.profile_handler.set_active(user, False, True) + yield self.profile_handler.set_active([user], False, True) return user_id |