mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-05-16 13:56:11 +08:00
Allow the poller to clean up module builds without arches
This commit is contained in:
@@ -181,7 +181,9 @@ class KojiModuleBuilder(GenericBuilder):
|
|||||||
self.koji_session = self.get_session(config)
|
self.koji_session = self.get_session(config)
|
||||||
self.arches = [arch.name for arch in self.module.arches]
|
self.arches = [arch.name for arch in self.module.arches]
|
||||||
|
|
||||||
if not self.arches:
|
# Allow KojiModuleBuilder to be initialized if no arches are set but the module is in
|
||||||
|
# a failed set. This will allow the clean up of old module builds.
|
||||||
|
if not self.arches and module.state not in models.FAILED_STATES:
|
||||||
raise ValueError("No arches specified in module build.")
|
raise ValueError("No arches specified in module build.")
|
||||||
|
|
||||||
# These eventually get populated by calling _connect and __prep is set to True
|
# These eventually get populated by calling _connect and __prep is set to True
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ BUILD_STATES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
INVERSE_BUILD_STATES = {v: k for k, v in BUILD_STATES.items()}
|
INVERSE_BUILD_STATES = {v: k for k, v in BUILD_STATES.items()}
|
||||||
|
FAILED_STATES = (BUILD_STATES["failed"], BUILD_STATES["garbage"])
|
||||||
|
|
||||||
|
|
||||||
def _utc_datetime_to_iso(datetime_object):
|
def _utc_datetime_to_iso(datetime_object):
|
||||||
|
|||||||
Reference in New Issue
Block a user