Improve waiter output
Add an extra newline, show the name of the task (from start()), and show the first step as a "Gathering information" message on the progressbar.
This commit is contained in:
parent
08411708f6
commit
d7ea705e31
|
@ -247,6 +247,8 @@ def confirm_opt(message):
|
|||
print("Aborted.")
|
||||
exit(0)
|
||||
|
||||
click.echo()
|
||||
|
||||
del kwargs["confirm_flag"]
|
||||
|
||||
return function(*args, **kwargs)
|
||||
|
|
|
@ -91,9 +91,18 @@ def wait_for_celery_task(CLI_CONFIG, task_detail):
|
|||
|
||||
# Start following the task state, updating progress as we go
|
||||
total_task = task_status.get("total")
|
||||
echo(
|
||||
CLI_CONFIG,
|
||||
task_status.get("status") + ":",
|
||||
)
|
||||
with progressbar(length=total_task, show_eta=False) as bar:
|
||||
last_task = 0
|
||||
maxlen = 0
|
||||
maxlen = 21
|
||||
echo(
|
||||
CLI_CONFIG,
|
||||
" " + "Gathering information",
|
||||
newline=False,
|
||||
)
|
||||
while True:
|
||||
sleep(0.25)
|
||||
if task_status.get("state") != "RUNNING":
|
||||
|
|
Loading…
Reference in New Issue