2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-14 10:53:51 +00:00
|
|
|
class BuildFinishedWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
include ApplicationWorker
|
2017-08-21 12:16:51 +00:00
|
|
|
include PipelineQueue
|
|
|
|
|
2017-11-28 16:16:50 +00:00
|
|
|
queue_namespace :pipeline_processing
|
2016-10-14 10:53:51 +00:00
|
|
|
|
|
|
|
def perform(build_id)
|
|
|
|
Ci::Build.find_by(id: build_id).try do |build|
|
2018-02-05 16:52:46 +00:00
|
|
|
# We execute that in sync as this access the files in order to access local file, and reduce IO
|
|
|
|
BuildTraceSectionsWorker.new.perform(build.id)
|
|
|
|
BuildCoverageWorker.new.perform(build.id)
|
|
|
|
|
|
|
|
# We execute that async as this are two indepentent operations that can be executed after TraceSections and Coverage
|
2018-02-05 08:06:53 +00:00
|
|
|
BuildHooksWorker.perform_async(build.id)
|
2018-03-06 11:20:36 +00:00
|
|
|
ArchiveTraceWorker.perform_async(build.id)
|
2016-10-14 10:53:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|