diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-08 23:33:51 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-08 23:33:51 +0300 |
commit | 20923257407d705fee0d5b3238f441402214f8cd (patch) | |
tree | ba89176c0755c0965acf9b8ee2c78bfa8508c835 /app/services/projects/destroy_service.rb | |
parent | c7dfbb9989195efa4af2d0baa5216fcdb3228e8e (diff) |
Add more logging before a project is destroyed
This adds a simple log message but also allows EE to insert database
events within the transaction (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6059/diffs).
Diffstat (limited to 'app/services/projects/destroy_service.rb')
-rw-r--r-- | app/services/projects/destroy_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb index de0125ed0dd..02769e72229 100644 --- a/app/services/projects/destroy_service.rb +++ b/app/services/projects/destroy_service.rb @@ -135,6 +135,7 @@ module Projects raise_error('Failed to remove some tags in project container registry. Please try again or contact administrator.') end + log_destroy_event trash_repositories! # Rails attempts to load all related records into memory before @@ -148,6 +149,10 @@ module Projects end end + def log_destroy_event + log_info("Attempting to destroy #{project.full_path} (#{project.id})") + end + ## # This method makes sure that we correctly remove registry tags # for legacy image repository (when repository path equals project path). |