2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
class ArchiveTraceWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
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-02-15 15:39:39 +05:30
|
|
|
Ci::ArchiveTraceService.new.execute(job)
|
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
|