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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-15 21:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-15 21:09:01 +0300
commit74804f8c31491045b62a4b9fed9f819531462ea2 (patch)
tree87c58fb3a34d871e37ed0320a124c5b64f815334 /app/workers/ci
parent10130901f1128c91596c4cbfe14b1e5c9f15032f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/ci')
-rw-r--r--app/workers/ci/drop_pipeline_worker.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/workers/ci/drop_pipeline_worker.rb b/app/workers/ci/drop_pipeline_worker.rb
new file mode 100644
index 00000000000..d19157a47e8
--- /dev/null
+++ b/app/workers/ci/drop_pipeline_worker.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Ci
+ class DropPipelineWorker
+ include ApplicationWorker
+ include PipelineQueue
+
+ idempotent!
+
+ def perform(pipeline_id, failure_reason)
+ Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
+ Ci::DropPipelineService.new.execute(pipeline, failure_reason.to_sym)
+ end
+ end
+ end
+end