add workflow lifecycle

This commit is contained in:
jxxghp
2025-02-16 16:53:38 +08:00
parent 0b7cf305a0
commit b86d06f632
7 changed files with 95 additions and 15 deletions

View File

@@ -0,0 +1,17 @@
from fastapi import FastAPI
from app.core.workflow import WorkFlowManager
def init_workflow(_: FastAPI):
"""
初始化动作
"""
WorkFlowManager()
def stop_workflow(_: FastAPI):
"""
停止动作
"""
WorkFlowManager().stop()