feat: 添加监控路由和相关功能,更新依赖项以支持新特性,增强服务监控能力
This commit is contained in:
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
# 加载 .env 文件
|
||||
try:
|
||||
from dotenv import load_dotenv
|
||||
|
||||
env_path = Path(__file__).parent / ".env"
|
||||
load_dotenv(env_path)
|
||||
print(f"已加载环境变量文件: {env_path}")
|
||||
@@ -25,5 +26,10 @@ sys.path.insert(0, project_root)
|
||||
from workflow_service.main import web_app
|
||||
import uvicorn
|
||||
|
||||
print("🚀 启动 ComfyUI 工作流服务监控...")
|
||||
print("📊 监控页面地址: http://localhost:18000/monitor")
|
||||
print("🔍 健康检查: http://localhost:18000/monitor/health")
|
||||
print("📈 API 文档: http://localhost:18000/docs")
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(web_app, host="0.0.0.0", port=18000)
|
||||
|
||||
Reference in New Issue
Block a user