00f0d356b7
Introduces the concept of Prerequisites for a CI build. If a build has unmet prerequisites it will go through the :preparing state before being made available to a runner. There are no actual prerequisites yet, so current behaviour is unchanged.
16 lines
324 B
Ruby
16 lines
324 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Ci
|
|
class BuildPrepareWorker
|
|
include ApplicationWorker
|
|
include PipelineQueue
|
|
|
|
queue_namespace :pipeline_processing
|
|
|
|
def perform(build_id)
|
|
Ci::Build.find_by_id(build_id).try do |build|
|
|
Ci::PrepareBuildService.new(build).execute
|
|
end
|
|
end
|
|
end
|
|
end
|