mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-11-06 07:09:21 +08:00
Do not count reused components to concurrent component builds threshold
This commit is contained in:
@@ -98,7 +98,12 @@ def at_concurrent_component_threshold(config, session):
|
||||
|
||||
if config.num_concurrent_builds and config.num_concurrent_builds <= \
|
||||
session.query(models.ComponentBuild).filter_by(
|
||||
state=koji.BUILD_STATES['BUILDING']).count():
|
||||
state=koji.BUILD_STATES['BUILDING'],
|
||||
# Components which are reused should not be counted in, because
|
||||
# we do not submit new build for them. They are in BUILDING state
|
||||
# just internally in MBS to be handled by
|
||||
# scheduler.handlers.components.complete.
|
||||
reused_component_id=None).count():
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user