fix workflow scheduler

This commit is contained in:
jxxghp
2025-02-26 18:24:27 +08:00
parent a7c4161f91
commit eec25113b5
4 changed files with 6 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ def start_workflow(workflow_id: int,
workflow = Workflow.get(db, workflow_id)
if not workflow:
return schemas.Response(success=False, message="工作流不存在")
Scheduler().remove_workflow_job(workflow)
Scheduler().update_workflow_job(workflow)
workflow.update_state(db, workflow_id, "W")
return schemas.Response(success=True)