diff options
author | Stan Hu <stanhu@gmail.com> | 2017-06-23 17:02:33 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-06-29 09:23:31 -0700 |
commit | fa93156528bca4306e040a1b73720b6411942fcf (patch) | |
tree | 863375c80f122d59ce57d31eb0f4605d3ea78474 /app/services/groups | |
parent | 5a983ac431affc800d5e9db9e83c14710ec29c36 (diff) | |
download | gitlab-ce-fa93156528bca4306e040a1b73720b6411942fcf.tar.gz |
Defer project destroys within a namespace in Groups::DestroyService#async_execute
Group#destroy would actually hard-delete all associated projects even
though the acts_as_paranoia gem is used, preventing Projects::DestroyService
from doing any work.
We first noticed this while trying to log all projects deletion to the Geo
log.
Diffstat (limited to 'app/services/groups')
-rw-r--r-- | app/services/groups/destroy_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/groups/destroy_service.rb b/app/services/groups/destroy_service.rb index d40d280140a..80c51cb5a72 100644 --- a/app/services/groups/destroy_service.rb +++ b/app/services/groups/destroy_service.rb @@ -1,8 +1,7 @@ module Groups class DestroyService < Groups::BaseService def async_execute - # Soft delete via paranoia gem - group.destroy + group.soft_delete_without_removing_associations job_id = GroupDestroyWorker.perform_async(group.id, current_user.id) Rails.logger.info("User #{current_user.id} scheduled a deletion of group ID #{group.id} with job ID #{job_id}") end |