BigW Consortium Gitlab

Commit abc64da9 by Shinya Maeda

Rename CreateArtifactsTraceService to CreateTraceArtifactService

parent 62e257f5
module Ci module Ci
class CreateArtifactsTraceService < BaseService class CreateTraceArtifactService < BaseService
def execute(job_id) def execute(job)
Ci::Build.find_by(id: job_id).try do |job|
return if job.job_artifacts_trace return if job.job_artifacts_trace
job.trace.read do |stream| job.trace.read do |stream|
...@@ -12,5 +11,4 @@ module Ci ...@@ -12,5 +11,4 @@ module Ci
end end
end end
end end
end
end end
...@@ -7,7 +7,7 @@ class BuildFinishedWorker ...@@ -7,7 +7,7 @@ class BuildFinishedWorker
def perform(build_id) def perform(build_id)
Ci::Build.find_by(id: build_id).try do |build| Ci::Build.find_by(id: build_id).try do |build|
BuildTraceSectionsWorker.perform_async(build.id) BuildTraceSectionsWorker.perform_async(build.id)
CreateArtifactsTraceWorker.perform_async(build.id) CreateTraceArtifactWorker.perform_async(build.id)
BuildCoverageWorker.new.perform(build.id) BuildCoverageWorker.new.perform(build.id)
BuildHooksWorker.new.perform(build.id) BuildHooksWorker.new.perform(build.id)
end end
......
class CreateArtifactsTraceWorker class CreateTraceArtifactWorker
include ApplicationWorker include ApplicationWorker
include PipelineQueue include PipelineQueue
def perform(job_id) def perform(job_id)
Ci::CreateArtifactsTraceService.new.execute(job_id) Ci::Build.find_by(id: job_id).try do |job|
Ci::CreateTraceArtifactService.new.execute(job)
end
end end
end end
##
# Current status of paths
# Era 1: Live/Full traces in database (ci_builds.trace)
# Era 2: Live/Full traces in `setting_root/YYYY_MM/project_ci_id/job_id.log`
# Era 3: Live/Full traces in `setting_root/YYYY_MM/project_id/job_id.log`
# Era 4: Live traces in `setting_root/YYYY_MM/project_id/job_id.log`. Full traces in JobArtifactUploader#default_path(FileStorage/ObjectStorage).
#
# The legacy paths are to be migrated to the latest era.
module Gitlab module Gitlab
module Ci module Ci
class Trace class Trace
......
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