diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-25 12:18:56 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-25 12:18:56 +0000 |
| commit | d2d913b606702ecefa01f03362602fde256e3f75 (patch) | |
| tree | 07643306ee63f789188a9133823aac3c92c94dfb /app/services/ci/pipeline_processing | |
| parent | af69e63b6655a450849a8fa2640ae6ce5a8db681 (diff) | |
| download | gitlab-ce-d2d913b606702ecefa01f03362602fde256e3f75.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/ci/pipeline_processing')
| -rw-r--r-- | app/services/ci/pipeline_processing/atomic_processing_service.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/ci/pipeline_processing/atomic_processing_service.rb b/app/services/ci/pipeline_processing/atomic_processing_service.rb index 4c087d23a53..1094a131e68 100644 --- a/app/services/ci/pipeline_processing/atomic_processing_service.rb +++ b/app/services/ci/pipeline_processing/atomic_processing_service.rb @@ -19,9 +19,10 @@ module Ci def execute return unless pipeline.needs_processing? + # Run the process only if we can obtain an exclusive lease; returns nil if lease is unavailable success = try_obtain_lease { process! } - # re-schedule if we need further processing + # Re-schedule if we need further processing if success && pipeline.needs_processing? PipelineProcessWorker.perform_async(pipeline.id) end |
