From dad106b4ff9ed75deee93d3879de1bd3f9c4f96e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 13 Mar 2026 14:48:07 +0800 Subject: [PATCH] bugfix --- dagflow/dagflow.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/dagflow/dagflow.py b/dagflow/dagflow.py index 290d585..02b6857 100644 --- a/dagflow/dagflow.py +++ b/dagflow/dagflow.py @@ -435,25 +435,26 @@ where instance_id=${instance_id}$ return False async def start_running(self, sor, node, edges, inst): - if self.is_ok_to_start(sor, node, edges, inst): - await sor.R('node_execution', { - 'id': node['id'], - 'status': 'running' - 'running_time': }) - try: - out = await self.run_auto_task(node) - sor.U('node_execution', { - 'id': node['id'], - 'status': 'done', - 'stopping_at': timestampstr(), - 'output_ctx': json.dumps(out, ensure_ascii=False) + if self.s_ok_to_step_next(sor, node, edges, inst): + await sor.R('node_execution', { + 'id': node['id'], + 'status': 'running', + 'running_time': timestampstr() }) - except Exception as e: - sor.U('node_execution', { - 'id': node['id'], - 'status': 'failed', - 'stopping_at': timestampstr() - } + try: + out = await self.run_auto_task(node) + sor.U('node_execution', { + 'id': node['id'], + 'status': 'done', + 'stopping_at': timestampstr(), + 'output_ctx': json.dumps(out, ensure_ascii=False) + }) + except Exception as e: + sor.U('node_execution', { + 'id': node['id'], + 'status': 'failed', + 'stopping_at': timestampstr() + } async def list_human_tasks(self, org_id, user_roles): env = ServerEnv()