fix(workflow_service): assign UUID to workflow_node_execution id and update optional fields in WorkflowRun and WorkflowNodeExecution models (#12096)

Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
-LAN- 2024-12-25 21:34:53 +08:00 • committed by GitHub
commit 822af70dce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 364 additions and 329 deletions

View file

@ -3,6 +3,7 @@ import time
from collections.abc import Sequence
from datetime import UTC, datetime
from typing import Any, Optional, cast
from uuid import uuid4
from core.app.apps.advanced_chat.app_config_manager import AdvancedChatAppConfigManager
from core.app.apps.workflow.app_config_manager import WorkflowAppConfigManager
@ -277,6 +278,7 @@ class WorkflowService:
error = e.error
workflow_node_execution = WorkflowNodeExecution()
workflow_node_execution.id = str(uuid4())
workflow_node_execution.tenant_id = app_model.tenant_id
workflow_node_execution.app_id = app_model.id
workflow_node_execution.workflow_id = draft_workflow.id