2018-06-27 03:23:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-10-14 06:53:51 -04:00
|
|
|
class BuildFinishedWorker
|
2017-11-28 11:08:30 -05:00
|
|
|
include ApplicationWorker
|
2017-08-21 08:16:51 -04:00
|
|
|
include PipelineQueue
|
|
|
|
|
2017-11-28 11:16:50 -05:00
|
|
|
queue_namespace :pipeline_processing
|
2016-10-14 06:53:51 -04:00
|
|
|
|
|
|
|
def perform(build_id)
|
|
|
|
Ci::Build.find_by(id: build_id).try do |build|
|
2018-02-05 11:52:46 -05: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 03:06:53 -05:00
|
|
|
BuildHooksWorker.perform_async(build.id)
|
2018-03-06 06:20:36 -05:00
|
|
|
ArchiveTraceWorker.perform_async(build.id)
|
2016-10-14 06:53:51 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|