瀏覽代碼

fix: ensure workflow_run_id is always set and improve handling in Wor… (#12264)

Signed-off-by: -LAN- <laipz8200@outlook.com>
tags/0.15.0
-LAN- 10 月之前
父節點
當前提交
62f792ea14
沒有連結到貢獻者的電子郵件帳戶。

+ 1
- 0
api/core/app/apps/workflow/app_generator.py 查看文件

@@ -221,6 +221,7 @@ class WorkflowAppGenerator(BaseAppGenerator):
single_iteration_run=WorkflowAppGenerateEntity.SingleIterationRunEntity(
node_id=node_id, inputs=args["inputs"]
),
workflow_run_id=str(uuid.uuid4()),
)
contexts.tenant_id.set(application_generate_entity.app_config.tenant_id)


+ 1
- 1
api/core/app/entities/app_invoke_entities.py 查看文件

@@ -195,7 +195,7 @@ class WorkflowAppGenerateEntity(AppGenerateEntity):

# app config
app_config: WorkflowUIBasedAppConfig
workflow_run_id: Optional[str] = None
workflow_run_id: str

class SingleIterationRunEntity(BaseModel):
"""

+ 2
- 1
api/core/app/task_pipeline/workflow_cycle_manage.py 查看文件

@@ -102,7 +102,8 @@ class WorkflowCycleManage:
inputs = dict(WorkflowEntry.handle_special_values(inputs) or {})

# init workflow run
workflow_run_id = str(self._workflow_system_variables.get(SystemVariableKey.WORKFLOW_RUN_ID, uuid4()))
# TODO: This workflow_run_id should always not be None, maybe we can use a more elegant way to handle this
workflow_run_id = str(self._workflow_system_variables.get(SystemVariableKey.WORKFLOW_RUN_ID) or uuid4())

workflow_run = WorkflowRun()
workflow_run.id = workflow_run_id

Loading…
取消
儲存