diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 00:06:02 +0000 |
commit | 8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (patch) | |
tree | 6bce184b45888ebeacc7060c84b892ecbd67a4ca /app/workers | |
parent | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (diff) | |
download | gitlab-ce-8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/stuck_ci_jobs_worker.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 5a248ab1137..b116965d105 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -73,5 +73,19 @@ class StuckCiJobsWorker Gitlab::OptimisticLocking.retry_lock(build, 3) do |b| b.drop(reason) end + rescue => ex + build.doom! + + track_exception_for_build(ex, build) + end + + def track_exception_for_build(ex, build) + Gitlab::Sentry.track_acceptable_exception(ex, extra: { + build_id: build.id, + build_name: build.name, + build_stage: build.stage, + pipeline_id: build.pipeline_id, + project_id: build.project_id + }) end end |