mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-14 11:09:44 +08:00
Try to continue batch build only when there are some components to build
This commit is contained in:
@@ -179,7 +179,15 @@ class MBSProducer(PollingProducer):
|
||||
state=models.BUILD_STATES['build']).all():
|
||||
# If there are no components in the build state on the module build,
|
||||
# then no possible event will start off new component builds
|
||||
if not module_build.current_batch(koji.BUILD_STATES['BUILDING']):
|
||||
unbuilt_components = [
|
||||
c for c in module_build.component_builds
|
||||
if (c.state != koji.BUILD_STATES['COMPLETE']
|
||||
and c.state != koji.BUILD_STATES["FAILED"]
|
||||
and c.state != koji.BUILD_STATES["CANCELED"])
|
||||
]
|
||||
|
||||
if (not module_build.current_batch(koji.BUILD_STATES['BUILDING'])
|
||||
and unbuilt_components):
|
||||
# Initialize the builder...
|
||||
builder = GenericBuilder.create_from_module(
|
||||
session, module_build, config)
|
||||
|
||||
Reference in New Issue
Block a user