Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/stuck_ci_jobs_worker.rb')
-rw-r--r--app/workers/stuck_ci_jobs_worker.rb8
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