Add proper exceptions handling in StuckCiJobsWorker
Issues like https://gitlab.com/gitlab-org/gitlab/issues/34749 show, that the worker is vulnerable for exceptions happening during model update in DB. What's worse is that exceptios happening on this level, are failing the whole execution of StuckCiJobsWorker, which unnoticed ends with thousands of stale pending/running/scheduled jobs waiting in the queue. This commit re-uses the fix added with https://gitlab.com/gitlab-org/gitlab/merge_requests/19150 to properly handle and log such exceptions and drop the jobs regardless of them.
Showing
Please register or sign in to comment