gitlab-org--gitlab-foss/app/workers/archive_trace_worker.rb
Shinya Maeda 3fbd48e127 Squashed commit of the following:
commit 10456b1e9240886432f565dd17689080bbb133b9
Merge: 312c1a9bdf8 a5f4627857
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Nov 29 14:33:21 2018 +0900

    Merge branch 'master-ce' into add-counter-for-trace-chunks

commit 312c1a9bdf8efc45c3fed5ff50f05cc589bbb4ed
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Nov 28 20:06:18 2018 +0900

    Fix coding offence

commit e397cc2ccc1b2cf7f8b3558b8fa81fe2aa0ab366
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Nov 28 14:40:24 2018 +0900

    Fix tracking archive failure
2018-11-29 14:35:00 +09:00

14 lines
363 B
Ruby

# frozen_string_literal: true
class ArchiveTraceWorker
include ApplicationWorker
include PipelineBackgroundQueue
# rubocop: disable CodeReuse/ActiveRecord
def perform(job_id)
Ci::Build.without_archived_trace.find_by(id: job_id).try do |job|
Ci::ArchiveTraceService.new.execute(job)
end
end
# rubocop: enable CodeReuse/ActiveRecord
end