From 4dc4c975f10e5307b6d0370161b129cddbe4f4d5 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 18 Jan 2024 12:37:51 -0500 Subject: [PATCH] Add status messages during task query --- client-cli/pvc/cli/cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index 62ac0f83..8cabe30e 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -687,7 +687,10 @@ def cli_cluster_task(task_id, wait_flag, format_function): if wait_flag: # First validate that this is actually a valid task that is running + echo(CLI_CONFIG, "Querying cluster for tasks...", newline=False) retcode, retdata = pvc.lib.common.task_status(CLI_CONFIG, None) + echo(CLI_CONFIG, " done.") + echo(CLI_CONFIG, "") if task_id in [i["id"] for i in retdata]: task = [i for i in retdata if i["id"] == task_id][0] retmsg = wait_for_celery_task( @@ -699,7 +702,10 @@ def cli_cluster_task(task_id, wait_flag, format_function): retmsg = f"No task with ID {task_id} found." finish(retcode, retmsg) else: + echo(CLI_CONFIG, "Querying cluster for tasks...", newline=False) retcode, retdata = pvc.lib.common.task_status(CLI_CONFIG, task_id) + echo(CLI_CONFIG, " done.") + echo(CLI_CONFIG, "") finish(retcode, retdata, format_function)