summaryrefslogtreecommitdiff
path: root/app/workers/ci/pipelines/create_artifact_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/ci/pipelines/create_artifact_worker.rb')
-rw-r--r--app/workers/ci/pipelines/create_artifact_worker.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/workers/ci/pipelines/create_artifact_worker.rb b/app/workers/ci/pipelines/create_artifact_worker.rb
new file mode 100644
index 00000000000..220df975503
--- /dev/null
+++ b/app/workers/ci/pipelines/create_artifact_worker.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+module Ci
+ module Pipelines
+ class CreateArtifactWorker
+ include ApplicationWorker
+ include PipelineBackgroundQueue
+
+ idempotent!
+
+ def perform(pipeline_id)
+ Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
+ Ci::Pipelines::CreateArtifactService.new.execute(pipeline)
+ end
+ end
+ end
+ end
+end