From 43e3dc2f95a25c600e08f65d4f1c406a1a63ed3d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 12 Feb 2020 18:09:21 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/services/users/destroy_service.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'app/services/users') diff --git a/app/services/users/destroy_service.rb b/app/services/users/destroy_service.rb index 643ebdc6839..ef79ee3d06e 100644 --- a/app/services/users/destroy_service.rb +++ b/app/services/users/destroy_service.rb @@ -56,12 +56,10 @@ module Users MigrateToGhostUserService.new(user).execute unless options[:hard_delete] - if Feature.enabled?(:destroy_user_associations_in_batches) - # Rails attempts to load all related records into memory before - # destroying: https://github.com/rails/rails/issues/22510 - # This ensures we delete records in batches. - user.destroy_dependent_associations_in_batches - end + # Rails attempts to load all related records into memory before + # destroying: https://github.com/rails/rails/issues/22510 + # This ensures we delete records in batches. + user.destroy_dependent_associations_in_batches # Destroy the namespace after destroying the user since certain methods may depend on the namespace existing user_data = user.destroy -- cgit v1.2.3