2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-06 11:20:36 +00:00
|
|
|
class ArchiveTraceWorker
|
2018-01-28 15:03:22 +00:00
|
|
|
include ApplicationWorker
|
2018-03-06 11:20:36 +00:00
|
|
|
include PipelineBackgroundQueue
|
2018-01-28 15:03:22 +00:00
|
|
|
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2018-01-28 15:03:22 +00:00
|
|
|
def perform(job_id)
|
2018-07-04 07:11:57 +00:00
|
|
|
Ci::Build.without_archived_trace.find_by(id: job_id).try do |job|
|
2019-07-18 09:22:46 +00:00
|
|
|
Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
|
2018-01-28 15:03:22 +00:00
|
|
|
end
|
|
|
|
end
|
2018-08-27 15:31:01 +00:00
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-01-28 15:03:22 +00:00
|
|
|
end
|