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-01-28 10:03:22 -05:00
|
|
|
CreateTraceArtifactWorker.perform_async(build.id)
|
2016-10-14 06:53:51 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|