summaryrefslogtreecommitdiff
path: root/app/services/projects/destroy_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/projects/destroy_service.rb')
-rw-r--r--app/services/projects/destroy_service.rb8
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