This commit is contained in:
yumoqing 2026-03-13 14:48:07 +08:00
parent 3228ccd246
commit dad106b4ff

View File

@ -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', {
if self.s_ok_to_step_next(sor, node, edges, inst):
await sor.R('node_execution', {
'id': node['id'],
'status': 'done',
'stopping_at': timestampstr(),
'output_ctx': json.dumps(out, ensure_ascii=False)
'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()