Welcome to mirror list, hosted at ThFree Co, Russian Federation.

create_cross_project_pipeline_worker.rb « ci « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 713d0092b32ebca46d08a7e57013b3d8e730323f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Ci
  class CreateCrossProjectPipelineWorker # rubocop:disable Scalability/IdempotentWorker
    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