mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Part deactivated users in the background
One room at a time so we don't take out the whole server with leave events, and restart at server restart.
This commit is contained in:
parent
bf98fa0864
commit
7e8726b8fb
2 changed files with 61 additions and 1 deletions
|
@ -526,3 +526,30 @@ class RegistrationStore(RegistrationWorkerStore,
|
|||
except self.database_engine.module.IntegrityError:
|
||||
ret = yield self.get_3pid_guest_access_token(medium, address)
|
||||
defer.returnValue(ret)
|
||||
|
||||
def add_user_pending_deactivation(self, user_id):
|
||||
return self._simple_insert(
|
||||
"users_pending_deactivation",
|
||||
values={
|
||||
"user_id": user_id,
|
||||
},
|
||||
desc="add_user_pending_deactivation",
|
||||
)
|
||||
|
||||
def del_user_pending_deactivation(self, user_id):
|
||||
return self._simple_delete_one(
|
||||
"users_pending_deactivation",
|
||||
keyvalues={
|
||||
"user_id": user_id,
|
||||
},
|
||||
desc="del_user_pending_deactivation",
|
||||
)
|
||||
|
||||
def get_user_pending_deactivation(self):
|
||||
return self._simple_select_one_onecol(
|
||||
"users_pending_deactivation",
|
||||
keyvalues={},
|
||||
retcol="user_id",
|
||||
allow_none=True,
|
||||
desc="get_users_pending_deactivation",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue