diff options
Diffstat (limited to 'app/workers/stuck_ci_jobs_worker.rb')
-rw-r--r-- | app/workers/stuck_ci_jobs_worker.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 20bc201f5f0..d87e866d8a7 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -21,9 +21,11 @@ class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker return unless try_obtain_lease - Ci::StuckBuilds::DropService.new.execute - - remove_lease + begin + Ci::StuckBuilds::DropService.new.execute + ensure + remove_lease + end end private |