summaryrefslogtreecommitdiff
path: root/app/workers/ci/initial_pipeline_process_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/ci/initial_pipeline_process_worker.rb')
-rw-r--r--app/workers/ci/initial_pipeline_process_worker.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/workers/ci/initial_pipeline_process_worker.rb b/app/workers/ci/initial_pipeline_process_worker.rb
new file mode 100644
index 00000000000..f59726c87fb
--- /dev/null
+++ b/app/workers/ci/initial_pipeline_process_worker.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module Ci
+ class InitialPipelineProcessWorker
+ include ApplicationWorker
+ include PipelineQueue
+
+ queue_namespace :pipeline_processing
+ feature_category :continuous_integration
+ urgency :high
+ loggable_arguments 1
+ idempotent!
+
+ def perform(pipeline_id)
+ Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
+ Ci::ProcessPipelineService
+ .new(pipeline)
+ .execute
+ end
+ end
+ end
+end