From 1988741cc9fc71fb4f45d1766a3212e59e0e1a6d Mon Sep 17 00:00:00 2001 From: Madhur Tandon Date: Tue, 17 Dec 2024 00:55:14 +0530 Subject: [PATCH] don't calculate status twice --- metaflow/plugins/argo/argo_workflows_deployer_objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metaflow/plugins/argo/argo_workflows_deployer_objects.py b/metaflow/plugins/argo/argo_workflows_deployer_objects.py index 58222407e66..b9a8153fc7c 100644 --- a/metaflow/plugins/argo/argo_workflows_deployer_objects.py +++ b/metaflow/plugins/argo/argo_workflows_deployer_objects.py @@ -206,7 +206,8 @@ def is_running(self): True if the workflow status is either 'Pending' or 'Running', False otherwise. """ - return self.status is not None and self.status in ["Pending", "Running"] + workflow_status = self.status + return workflow_status is not None and workflow_status in ["Pending", "Running"] @property def status(self) -> Optional[str]: