Files
push_fenxiangfengshi/run.bat
T
houhuan 4ee30399bf refactor: 重构为可部署到服务器的模块化结构(v5.0.0)
- 拆包 fengxiang/:config/client/store/notify/monitor/admin/tts,统一入口 order_monitor.py
- 服务器形态:Docker 常驻,Cookie 由本机登录后 POST 上传并热加载,不再依赖桌面弹窗
- 修复:首次启动重推历史订单、speak() 阻塞主循环、夜间 sleep 10h 不可中断
- 修复:test_push.py 残留 miservice 依赖(小爱已移除)、run_monitor.bat 写死盘符
- 配置化:webhook/shopId 移出源码(环境变量 > config.yaml > 默认值)
- 可观测:滚动文件日志 + /healthz + Docker HEALTHCHECK + 告警冷却
- 飞书通道保留配置位,默认关闭(原 token 已失效 code=19001)
- 新增 22 项单元测试(不联网)
2026-11-16 12:45:23 +08:00

39 lines
1.3 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@echo off
chcp 65001 >nul
title 丰享订单监控 v5
cd /d "%~dp0"
echo ============================================
echo 丰享订单监控 v5
echo 推送: 企业微信(TTS 可选,见 config.yaml)
echo ============================================
echo.
:: 依次尝试:项目内虚拟环境 -> FX_PYTHON -> IndexTTS2 环境 -> 系统 python
set "PYTHON="
if exist ".venv\Scripts\python.exe" set "PYTHON=.venv\Scripts\python.exe"
if not defined PYTHON if defined FX_PYTHON set "PYTHON=%FX_PYTHON%"
if not defined PYTHON if exist "E:\2025Code\python\IndexTT\index-tts\.venv\Scripts\python.exe" set "PYTHON=E:\2025Code\python\IndexTT\index-tts\.venv\Scripts\python.exe"
if not defined PYTHON set "PYTHON=python"
echo [环境] Python: %PYTHON%
"%PYTHON%" -c "import requests, yaml" >nul 2>&1
if errorlevel 1 (
echo [准备] 缺少依赖,正在安装...
"%PYTHON%" -m pip install -r requirements.txt
)
if not exist "config.yaml" (
echo [提示] 未找到 config.yaml,将使用默认配置
echo 建议复制 config.example.yaml 为 config.yaml 后填写企业微信 webhook
echo.
)
echo [启动] 启动监控(Ctrl+C 退出)...
echo.
"%PYTHON%" order_monitor.py
echo.
echo [结束] 进程已退出,错误码: %errorlevel%
pause