2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
2020-04-08 14:13:33 +05:30
|
|
|
class CreateCrossProjectPipelineWorker # rubocop:disable Scalability/IdempotentWorker
|
2020-03-13 15:44:24 +05:30
|
|
|
include ::ApplicationWorker
|
|
|
|
include ::PipelineQueue
|
|
|
|
|
|
|
|
worker_resource_boundary :cpu
|
|
|
|
|
|
|
|
def perform(bridge_id)
|
|
|
|
::Ci::Bridge.find_by_id(bridge_id).try do |bridge|
|
2020-11-24 15:15:51 +05:30
|
|
|
::Ci::CreateDownstreamPipelineService
|
2020-03-13 15:44:24 +05:30
|
|
|
.new(bridge.project, bridge.user)
|
|
|
|
.execute(bridge)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|