diff options
Diffstat (limited to 'app/services/users')
-rw-r--r-- | app/services/users/destroy_service.rb | 10 |
1 files changed, 4 insertions, 6 deletions
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 |