2020-02-08 06:08:50 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
2020-02-19 18:09:10 +00:00
|
|
|
class PipelineBridgeStatusWorker # rubocop:disable Scalability/IdempotentWorker
|
2020-02-08 06:08:50 +00:00
|
|
|
include ::ApplicationWorker
|
|
|
|
include ::PipelineQueue
|
|
|
|
|
|
|
|
latency_sensitive_worker!
|
|
|
|
worker_resource_boundary :cpu
|
|
|
|
|
|
|
|
def perform(pipeline_id)
|
|
|
|
::Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
|
|
|
|
::Ci::PipelineBridgeStatusService
|
|
|
|
.new(pipeline.project, pipeline.user)
|
|
|
|
.execute(pipeline)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|