feat: 添加监控路由和相关功能,更新依赖项以支持新特性,增强服务监控能力

This commit is contained in:
iHeyTang
2025-08-14 14:40:42 +08:00
parent 6240b98c5b
commit 9c72bffd21
5 changed files with 456 additions and 2 deletions

View File

@@ -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)