2021-09-30 23:02:18 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Ci
|
|
|
|
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
2021-10-27 15:23:28 +05:30
|
|
|
data_consistency :always
|
|
|
|
|
2021-09-30 23:02:18 +05:30
|
|
|
sidekiq_options retry: 3
|
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
|
|
|
def perform(job_id)
|
2021-12-11 22:18:48 +05:30
|
|
|
Ci::Build.without_archived_trace.find_by_id(job_id).try do |job|
|
2021-09-30 23:02:18 +05:30
|
|
|
Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|