Commit 20923257 authored by Stan Hu's avatar Stan Hu

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).
parent c7dfbb99
...@@ -135,6 +135,7 @@ module Projects ...@@ -135,6 +135,7 @@ module Projects
raise_error('Failed to remove some tags in project container registry. Please try again or contact administrator.') raise_error('Failed to remove some tags in project container registry. Please try again or contact administrator.')
end end
log_destroy_event
trash_repositories! trash_repositories!
# Rails attempts to load all related records into memory before # Rails attempts to load all related records into memory before
...@@ -148,6 +149,10 @@ module Projects ...@@ -148,6 +149,10 @@ module Projects
end end
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 # This method makes sure that we correctly remove registry tags
# for legacy image repository (when repository path equals project path). # for legacy image repository (when repository path equals project path).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment