2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
|
2018-01-28 10:03:22 -05:00
|
|
|
include ApplicationWorker
|
2021-04-30 14:10:09 -04:00
|
|
|
|
|
|
|
sidekiq_options retry: 3
|
2018-03-06 06:20:36 -05:00
|
|
|
include PipelineBackgroundQueue
|
2018-01-28 10:03:22 -05:00
|
|
|
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2018-01-28 10:03:22 -05:00
|
|
|
def perform(job_id)
|
2018-07-04 03:11:57 -04:00
|
|
|
Ci::Build.without_archived_trace.find_by(id: job_id).try do |job|
|
2019-07-18 05:22:46 -04:00
|
|
|
Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
|
2018-01-28 10:03:22 -05:00
|
|
|
end
|
|
|
|
end
|
2018-08-27 11:31:01 -04:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-01-28 10:03:22 -05:00
|
|
|
end
|