2021-07-13 15:08:38 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-07-21 12:09:35 +00:00
|
|
|
data_consistency :always
|
|
|
|
|
2021-07-13 15:08:38 +00:00
|
|
|
sidekiq_options retry: 3
|
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
|
|
|
def perform(job_id)
|
2021-11-10 15:13:21 +00:00
|
|
|
Ci::Build.without_archived_trace.find_by_id(job_id).try do |job|
|
2021-07-13 15:08:38 +00:00
|
|
|
Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|