| |
@@ -105,6 +105,7 @@
|
| |
# TODO re-use
|
| |
|
| |
if conf.system == "koji":
|
| |
+ ten_minutes = timedelta(minutes=10)
|
| |
# We don't do this on behalf of users
|
| |
koji_session = get_session(conf, login=False)
|
| |
log.info("Querying tasks for statuses:")
|
| |
@@ -119,15 +120,17 @@
|
| |
if not component_build.task_id:
|
| |
continue
|
| |
|
| |
- # Don't check tasks for components which have been reused,
|
| |
- # they may have BUILDING state temporarily before we tag them
|
| |
- # to new module tag. Checking them would be waste of resources.
|
| |
+ # For components which have been reused, wait 10 minutes before checking.
|
| |
+ # They may be in BUILDING state temporarily before we tag them
|
| |
+ # to new module tag. Checking them at that point would be waste of resources.
|
| |
if component_build.reused_component_id:
|
| |
- log.debug(
|
| |
- 'Skipping check for task "%s", the component has been reused ("%s").',
|
| |
- component_build.task_id, component_build.reused_component_id
|
| |
- )
|
| |
- continue
|
| |
+ now = datetime.utcnow()
|
| |
+ if (now - component_build.module_build.time_modified) < ten_minutes:
|
| |
+ log.debug(
|
| |
+ 'Skipping check for task "%s", the component has been reused ("%s").',
|
| |
+ component_build.task_id, component_build.reused_component_id
|
| |
+ )
|
| |
+ continue
|
| |
|
| |
task_id = component_build.task_id
|
| |
|
| |
@@ -165,6 +168,7 @@
|
| |
build_name=component_build.package,
|
| |
build_release=build_release,
|
| |
build_version=build_version,
|
| |
+ module_build_id=component_build.module_build.id,
|
| |
)
|
| |
|
| |
elif conf.system == "mock":
|
| |
Fixes: https://pagure.io/fm-orchestrator/issue/1621