diff options
Diffstat (limited to 'app/workers/ci')
-rw-r--r-- | app/workers/ci/create_cross_project_pipeline_worker.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/workers/ci/create_cross_project_pipeline_worker.rb b/app/workers/ci/create_cross_project_pipeline_worker.rb new file mode 100644 index 00000000000..91e9317713e --- /dev/null +++ b/app/workers/ci/create_cross_project_pipeline_worker.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module Ci + class CreateCrossProjectPipelineWorker + include ::ApplicationWorker + include ::PipelineQueue + + worker_resource_boundary :cpu + + def perform(bridge_id) + ::Ci::Bridge.find_by_id(bridge_id).try do |bridge| + ::Ci::CreateCrossProjectPipelineService + .new(bridge.project, bridge.user) + .execute(bridge) + end + end + end +end |