diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 09:16:11 +0000 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/services/projects/destroy_service.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) | |
download | gitlab-ce-76a9e64d004e0c02c35b8165ca38d005afb5e823.tar.gz |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/services/projects/destroy_service.rb')
-rw-r--r-- | app/services/projects/destroy_service.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/services/projects/destroy_service.rb b/app/services/projects/destroy_service.rb index aef92b8adee..5c4a0e947de 100644 --- a/app/services/projects/destroy_service.rb +++ b/app/services/projects/destroy_service.rb @@ -41,6 +41,8 @@ module Projects true rescue StandardError => error + context = Gitlab::ApplicationContext.current.merge(project_id: project.id) + Gitlab::ErrorTracking.track_exception(error, **context) attempt_rollback(project, error.message) false rescue Exception => error # rubocop:disable Lint/RescueException @@ -80,8 +82,14 @@ module Projects end def remove_events + log_info("Attempting to destroy events from #{project.full_path} (#{project.id})") + response = ::Events::DestroyService.new(project).execute + if response.error? + log_error("Event deletion failed on #{project.full_path} with the following message: #{response.message}") + end + response.success? end |