From 7663ad72c500da1f649ddf9b599982c8f523ba79 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 20 Aug 2024 17:22:15 -0400 Subject: [PATCH] Update length of progress bar each update Allows us to start with a lower length, and increase it later. --- client-cli/pvc/cli/waiters.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client-cli/pvc/cli/waiters.py b/client-cli/pvc/cli/waiters.py index b8bc7f13..87d5dad5 100644 --- a/client-cli/pvc/cli/waiters.py +++ b/client-cli/pvc/cli/waiters.py @@ -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