Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
294e9a0c
Commit
294e9a0c
authored
6 years ago
by
David Baker
Browse files
Options
Downloads
Patches
Plain Diff
Prefix internal functions
parent
46df23f5
No related branches found
Branches containing commit
Tags
v0.18.6-rc3
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/deactivate_account.py
+7
-7
7 additions, 7 deletions
synapse/handlers/deactivate_account.py
with
7 additions
and
7 deletions
synapse/handlers/deactivate_account.py
+
7
−
7
View file @
294e9a0c
...
...
@@ -33,7 +33,7 @@ class DeactivateAccountHandler(BaseHandler):
self
.
_user_parter_running
=
False
reactor
.
callWhenRunning
(
self
.
start_user_parting
)
reactor
.
callWhenRunning
(
self
.
_
start_user_parting
)
@defer.inlineCallbacks
def
deactivate_account
(
self
,
user_id
):
...
...
@@ -60,14 +60,14 @@ class DeactivateAccountHandler(BaseHandler):
yield
self
.
store
.
add_user_pending_deactivation
(
user_id
)
self
.
start_user_parting
()
self
.
_
start_user_parting
()
def
start_user_parting
(
self
):
def
_
start_user_parting
(
self
):
if
not
self
.
_user_parter_running
:
run_in_background
(
self
.
user_parter_loop
())
run_in_background
(
self
.
_
user_parter_loop
())
@defer.inlineCallbacks
def
user_parter_loop
(
self
):
def
_
user_parter_loop
(
self
):
self
.
_user_parter_running
=
True
logger
.
info
(
"
Starting user parter
"
)
try
:
...
...
@@ -76,7 +76,7 @@ class DeactivateAccountHandler(BaseHandler):
if
user_id
is
None
:
break
logger
.
info
(
"
User parter parting %r
"
,
user_id
)
yield
self
.
part_user
(
user_id
)
yield
self
.
_
part_user
(
user_id
)
yield
self
.
store
.
del_user_pending_deactivation
(
user_id
)
logger
.
info
(
"
User parter finished parting %r
"
,
user_id
)
logger
.
info
(
"
User parter finished: stopping
"
)
...
...
@@ -84,7 +84,7 @@ class DeactivateAccountHandler(BaseHandler):
self
.
_user_parter_running
=
False
@defer.inlineCallbacks
def
part_user
(
self
,
user_id
):
def
_
part_user
(
self
,
user_id
):
user
=
UserID
.
from_string
(
user_id
)
rooms_for_user
=
yield
self
.
store
.
get_rooms_for_user
(
user_id
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment