2019-03-03 18:56:20 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
2020-02-19 13:09:10 -05:00
|
|
|
class BuildPrepareWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-03-03 18:56:20 -05:00
|
|
|
include ApplicationWorker
|
2021-04-30 14:10:09 -04:00
|
|
|
|
2021-07-21 08:09:35 -04:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-04-30 14:10:09 -04:00
|
|
|
sidekiq_options retry: 3
|
2019-03-03 18:56:20 -05:00
|
|
|
include PipelineQueue
|
|
|
|
|
|
|
|
queue_namespace :pipeline_processing
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :continuous_integration
|
2019-03-03 18:56:20 -05:00
|
|
|
|
|
|
|
def perform(build_id)
|
|
|
|
Ci::Build.find_by_id(build_id).try do |build|
|
|
|
|
Ci::PrepareBuildService.new(build).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|