diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-23 11:48:46 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-01-25 10:40:34 +0100 |
commit | db33021d633881939f1c890effae3bfc77f4b966 (patch) | |
tree | 81162a46bfa72cf9bdcbd1210d68c23a2076bee8 | |
parent | 8850da27c3a1db7611c856d937a8b93e6b969b86 (diff) | |
download | gitlab-ce-db33021d633881939f1c890effae3bfc77f4b966.tar.gz |
Make it clear that pipeline can process processables
-rw-r--r-- | app/services/ci/process_pipeline_service.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/services/ci/process_pipeline_service.rb b/app/services/ci/process_pipeline_service.rb index 7dbb5c16c70..4a7ce00b8e2 100644 --- a/app/services/ci/process_pipeline_service.rb +++ b/app/services/ci/process_pipeline_service.rb @@ -10,7 +10,7 @@ module Ci update_retried new_builds = - stage_indexes_of_created_builds.map do |index| + stage_indexes_of_created_processables.map do |index| process_stage(index) end @@ -27,7 +27,7 @@ module Ci return if HasStatus::BLOCKED_STATUS.include?(current_status) if HasStatus::COMPLETED_STATUSES.include?(current_status) - created_builds_in_stage(index).select do |build| + created_processables_in_stage(index).select do |build| Gitlab::OptimisticLocking.retry_lock(build) do |subject| Ci::ProcessBuildService.new(project, @user) .execute(build, current_status) @@ -43,18 +43,18 @@ module Ci # rubocop: enable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord - def stage_indexes_of_created_builds - created_builds.order(:stage_idx).pluck('distinct stage_idx') + def stage_indexes_of_created_processables + created_processables.order(:stage_idx).pluck('distinct stage_idx') end # rubocop: enable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord - def created_builds_in_stage(index) - created_builds.where(stage_idx: index) + def created_processables_in_stage(index) + created_processables.where(stage_idx: index) end # rubocop: enable CodeReuse/ActiveRecord - def created_builds + def created_processables pipeline.processables.created end |