2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-06 06:20:36 -05:00
|
|
|
class ArchiveTraceWorker
|
2018-01-28 10:03:22 -05:00
|
|
|
include ApplicationWorker
|
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|
|
2018-11-29 00:34:14 -05:00
|
|
|
Ci::ArchiveTraceService.new.execute(job)
|
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
|