| |
@@ -6978,6 +6978,8 @@
|
| |
help=_("URL under which Koji files are accessible"))
|
| |
parser.add_option("--noprogress", action="store_true",
|
| |
help=_("Do not display progress meter"))
|
| |
+ parser.add_option("--wait", action="store_true",
|
| |
+ help=_("Wait for running tasks to finish"))
|
| |
parser.add_option("-q", "--quiet", action="store_true",
|
| |
help=_("Suppress output"), default=options.quiet)
|
| |
|
| |
@@ -6999,6 +7001,13 @@
|
| |
if not base_task:
|
| |
error(_('No such task: #%i') % base_task_id)
|
| |
|
| |
+ if suboptions.wait and base_task['state'] not in (
|
| |
+ koji.TASK_STATES['CLOSED'],
|
| |
+ koji.TASK_STATES['CANCELED'],
|
| |
+ koji.TASK_STATES['FAILED']):
|
| |
+ watch_tasks(session, [base_task_id], quiet=suboptions.quiet,
|
| |
+ poll_interval=options.poll_interval)
|
| |
+
|
| |
def check_downloadable(task):
|
| |
return task["method"] == "buildArch"
|
| |
|
| |
If task is not finished yet, wait for it and download output then.
Fixes: https://pagure.io/koji/issue/2052