feat: 统一部署目录——所有运行时文件归入MoFin repo

- deploy/bot/ — XMPP bot核心(xmpp_agent_core + xmpp_zhiwei_bot)
- deploy/profile-scripts/ — cron脚本(price_monitor等)
- 运行时文件已替换为指向MoFin的符号链接
- 改代码只需改MoFin,系统自动生效
This commit is contained in:
知微
2026-07-17 23:12:35 +08:00
parent ab74188915
commit 80d59c9331
103 changed files with 29293 additions and 0 deletions
@@ -0,0 +1,32 @@
#!/usr/bin/env python3
"""Wrapper script: generates intraday monitor report.
Hermes cron runner does not support script arguments, so this wrapper
calls generate_report.py with the 'intraday_monitor' argument.
Used by both 盘前中监控 and 午后监控 cron jobs.
"""
import sys
import subprocess
from pathlib import Path
script_dir = Path(__file__).parent.resolve()
target = script_dir / "generate_report.py"
if not target.exists():
print(f"ERROR: generate_report.py not found at {target}", file=sys.stderr)
sys.exit(1)
result = subprocess.run(
[sys.executable, str(target), "intraday_monitor"],
capture_output=True, text=True, timeout=120,
)
if result.stdout:
print(result.stdout.strip())
if result.returncode != 0:
error_msg = f"Script exited with code {result.returncode}"
if result.stderr:
error_msg += f"\nstderr:\n{result.stderr}"
print(error_msg, file=sys.stderr)
sys.exit(result.returncode)
if result.stderr:
print(f"stderr:\n{result.stderr}", file=sys.stderr)