Class: ArchiveTraceWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker, PipelineBackgroundQueue
Defined in:
app/workers/archive_trace_worker.rb

Overview

rubocop:disable Scalability/IdempotentWorker

Constant Summary

Constants included from ApplicationWorker

ApplicationWorker::LOGGING_EXTRA_KEY

Constants included from WorkerAttributes

WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES

Instance Method Summary collapse

Methods included from Gitlab::SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Instance Method Details

#perform(job_id) ⇒ Object

rubocop: disable CodeReuse/ActiveRecord


8
9
10
11
12
# File 'app/workers/archive_trace_worker.rb', line 8

def perform(job_id)
  Ci::Build.without_archived_trace.find_by(id: job_id).try do |job|
    Ci::ArchiveTraceService.new.execute(job, worker_name: self.class.name)
  end
end