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
|
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
2021-01-03 14:25:43 +05:30
|
|
|
tags :requires_disk_io
|
|
|
|
|
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
|