From 974e0d6ac262c98732b82e0dcfe89440688e713d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 30 Sep 2024 03:04:10 -0400 Subject: [PATCH] Shorten progress bars to 20 characters They were needlessly long and this limited the message size. --- client-cli/pvc/cli/waiters.py | 2 +- client-cli/pvc/lib/common.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client-cli/pvc/cli/waiters.py b/client-cli/pvc/cli/waiters.py index c438862d..9796dd59 100644 --- a/client-cli/pvc/cli/waiters.py +++ b/client-cli/pvc/cli/waiters.py @@ -107,7 +107,7 @@ def wait_for_celery_task(CLI_CONFIG, task_detail, start_late=False): # Start following the task state, updating progress as we go total_task = task_status.get("total") - with progressbar(length=total_task, show_eta=False) as bar: + with progressbar(length=total_task, width=20, show_eta=False) as bar: last_task = 0 maxlen = 21 echo( diff --git a/client-cli/pvc/lib/common.py b/client-cli/pvc/lib/common.py index 1dbb5eb7..5cc9aaef 100644 --- a/client-cli/pvc/lib/common.py +++ b/client-cli/pvc/lib/common.py @@ -83,7 +83,7 @@ class UploadProgressBar(object): else: self.end_suffix = "" - self.bar = click.progressbar(length=self.length, show_eta=True) + self.bar = click.progressbar(length=self.length, width=20, show_eta=True) def update(self, monitor): bytes_cur = monitor.bytes_read