From e92ed245d6713a794cc906f5d0ee5a21f6dc03b7 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 16 Nov 2023 15:31:25 -0500 Subject: [PATCH] Pass proper task details into wait function --- client-cli/pvc/cli/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client-cli/pvc/cli/cli.py b/client-cli/pvc/cli/cli.py index 98020bd7..6967cad1 100644 --- a/client-cli/pvc/cli/cli.py +++ b/client-cli/pvc/cli/cli.py @@ -569,8 +569,11 @@ def cli_cluster_task(task_id, wait_flag, format_function): # First validate that this is actually a valid task that is running retcode, retdata = pvc.lib.common.task_status(CLI_CONFIG, None) 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( - CLI_CONFIG, {"task_id": task_id}, start_late=True + CLI_CONFIG, + {"task_id": task["id"], "task_name": task["name"]}, + start_late=True, ) else: retmsg = f"No task with ID {task_id} found."