Remove wrapping transaction for account deletion
This uses a lot of memory for big accounts. Also it doesn't make much sense to rollback everything when something fails, it's better to delete everything we can.
This commit is contained in:
parent
faff140a3f
commit
4e6d92ce63
1 changed files with 7 additions and 9 deletions
|
|
@ -25,17 +25,15 @@ class AccountDeleter
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform!
|
def perform!
|
||||||
ActiveRecord::Base.transaction do
|
# close person
|
||||||
#person
|
delete_standard_person_associations
|
||||||
delete_standard_person_associations
|
remove_conversation_visibilities
|
||||||
remove_conversation_visibilities
|
delete_contacts_of_me
|
||||||
delete_contacts_of_me
|
tombstone_person_and_profile
|
||||||
tombstone_person_and_profile
|
|
||||||
|
|
||||||
close_user if user
|
close_user if user
|
||||||
|
|
||||||
mark_account_deletion_complete
|
mark_account_deletion_complete
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# user deletion methods
|
# user deletion methods
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue