debian-mirror-gitlab/app/workers/ci/drop_pipeline_worker.rb
2022-05-07 20:08:51 +05:30

22 lines
432 B
Ruby

# frozen_string_literal: true
module Ci
class DropPipelineWorker
include ApplicationWorker
data_consistency :always
sidekiq_options retry: 3
include PipelineQueue
urgency :high
idempotent!
def perform(pipeline_id, failure_reason)
Ci::Pipeline.find_by_id(pipeline_id).try do |pipeline|
Ci::DropPipelineService.new.execute(pipeline, failure_reason.to_sym)
end
end
end
end