diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2019-08-02 19:31:01 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-08-02 20:31:17 +0200 |
commit | 593490e5ac6ec5a92fdcc9b82eebbb455ea6cf48 (patch) | |
tree | 56dd0ba4cbb8876e96cfab57a22c186e3fff418d /app/models | |
parent | 8156e77c1a25bc6050e5036fa3bbfd29201a6d5c (diff) | |
download | gitlab-ce-593490e5ac6ec5a92fdcc9b82eebbb455ea6cf48.tar.gz |
Extend PipelineProcessWorker to accept a list of buildsprefer-to-use-process-pipeline-worker
This changes used worker from `BuildProcessWorker`
to `PipelineProcessWorker` to make pipeline
processing much simpler. We process `pipeline_id`,
based on some triggers.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/pipeline.rb | 4 | ||||
-rw-r--r-- | app/models/commit_status.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 3515f0b83ee..217061c6814 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -611,8 +611,8 @@ module Ci end # rubocop: disable CodeReuse/ServiceClass - def process!(trigger_build_name = nil) - Ci::ProcessPipelineService.new(project, user).execute(self, trigger_build_name) + def process!(trigger_build_ids = nil) + Ci::ProcessPipelineService.new(project, user).execute(self, trigger_build_ids) end # rubocop: enable CodeReuse/ServiceClass diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index d7eb78db5b8..004ff037558 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -122,7 +122,7 @@ class CommitStatus < ApplicationRecord commit_status.run_after_commit do if pipeline_id if complete? || manual? - BuildProcessWorker.perform_async(id) + PipelineProcessWorker.perform_async(pipeline_id, [id]) else PipelineUpdateWorker.perform_async(pipeline_id) end |