Commit 35b1c1a5 authored by Sean Arnold's avatar Sean Arnold

Rename method, remove change to worker scope

parent dda6ed2b
......@@ -11,20 +11,10 @@ module Ci
# rubocop: disable CodeReuse/ActiveRecord
def perform(job_id)
ci_build_scope.find_by(id: job_id).try do |job|
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
# rubocop: enable CodeReuse/ActiveRecord
private
def ci_build_scope
if Feature.enabled?(:ci_enable_live_trace)
Ci::Build.with_live_trace
else
Ci::Build.without_archived_trace
end
end
end
end
......@@ -191,7 +191,7 @@ module Gitlab
def unsafe_archive!
raise ArchiveError, 'Job is not finished yet' unless job.complete?
unsafe_trace_cleanup!
unsafe_trace_conditionally_cleanup_before_retry!
if job.trace_chunks.any?
Gitlab::Ci::Trace::ChunkedIO.new(job) do |stream|
......@@ -217,7 +217,7 @@ module Gitlab
trace_artifact&.archived_trace_exists?
end
def unsafe_trace_cleanup!
def unsafe_trace_conditionally_cleanup_before_retry!
return unless trace_artifact
if already_archived?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment