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/ci/cancel_pipeline_worker.rb')
-rw-r--r--app/workers/ci/cancel_pipeline_worker.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/workers/ci/cancel_pipeline_worker.rb b/app/workers/ci/cancel_pipeline_worker.rb
index 2735498b6bb..0b2c96e7ace 100644
--- a/app/workers/ci/cancel_pipeline_worker.rb
+++ b/app/workers/ci/cancel_pipeline_worker.rb
@@ -14,12 +14,14 @@ module Ci
def perform(pipeline_id, auto_canceled_by_pipeline_id)
::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
- pipeline.cancel_running(
- # cascade_to_children is false because we iterate through children
- # we also cancel bridges prior to prevent more children
+ # cascade_to_children is false because we iterate through children
+ # we also cancel bridges prior to prevent more children
+ ::Ci::CancelPipelineService.new(
+ pipeline: pipeline,
+ current_user: nil,
cascade_to_children: false,
auto_canceled_by_pipeline_id: auto_canceled_by_pipeline_id
- )
+ ).force_execute
end
end
end