2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-04-08 14:13:33 +05:30
|
|
|
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
|
2018-03-27 19:54:05 +05:30
|
|
|
include ApplicationWorker
|
2021-06-08 01:23:25 +05:30
|
|
|
|
|
|
|
sidekiq_options retry: 3
|
2018-03-27 19:54:05 +05:30
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2018-03-27 19:54:05 +05:30
|
|
|
def perform(job_id)
|
2018-11-08 19:23:39 +05:30
|
|
|
Ci::Build.without_archived_trace.find_by(id: job_id).try do |job|
|
2019-10-12 21:52:04 +05:30
|
|
|
Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|
|
|
|
end
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-03-27 19:54:05 +05:30
|
|
|
end
|