Update length of progress bar each update

Allows us to start with a lower length, and increase it later.
This commit is contained in:
Joshua Boniface 2024-08-20 17:22:15 -04:00
parent 9b3075be18
commit 7663ad72c5
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ def wait_for_celery_task(CLI_CONFIG, task_detail, start_late=False):
break
if task_status.get("current") > last_task:
current_task = int(task_status.get("current"))
total_task = int(task_status.get("total"))
bar.length = total_task
bar.update(current_task - last_task)
last_task = current_task
# The extensive spaces at the end cause this to overwrite longer previous messages