8f016f25df
- ORM migration: models/ops 重构 - deploy: 标准化 systemd timer/service 部署体系 - MCP server: 5 个只读工具(任务/状态/数据集) - daily check: 数据一致性巡检 - watch: task_watch 后台监控 - kline_daily: 麦蕊优先,时间门禁15:00 - 删除: task_industry_sector, task_sector_features
31 lines
1.1 KiB
Desktop File
31 lines
1.1 KiB
Desktop File
[Unit]
|
||
Description=Market sync daily check — reads dataset_registry, writes report, alerts on failures
|
||
Documentation=file:///home/gao/Development/quant_home/market_sync/bin/daily_sync_check.py
|
||
After=network-online.target
|
||
Wants=network-online.target
|
||
|
||
[Service]
|
||
Type=oneshot
|
||
WorkingDirectory=/home/gao/Development/quant_home/market_sync
|
||
User=gao
|
||
Group=gao
|
||
|
||
# 巡检:读 PG dataset_registry,对比今日预期,写 logs/daily_check_*.json
|
||
# 失败时 POST webhook 到 FAILURE_WEBHOOK_URL(HMAC-SHA256 签名)
|
||
ExecStart=/home/gao/Development/quant_home/market_sync/.venv/bin/python /home/gao/Development/quant_home/market_sync/bin/daily_sync_check.py
|
||
|
||
# 巡检应 < 30s 完成;超时 = PG 不通或代码 bug,不让卡死
|
||
TimeoutStartSec=120
|
||
|
||
# 不要 Restart=(oneshot 失败就让 OnFailure= 发通知,别自动重跑)
|
||
# 失败时 exit code = 1,可被 OnFailure= 钩住发通知
|
||
|
||
# 日志走 journald(journalctl -u market-sync-daily-check -f)
|
||
StandardOutput=journal
|
||
StandardError=journal
|
||
SyslogIdentifier=market-sync-daily-check
|
||
|
||
Environment=PYTHONUNBUFFERED=1
|
||
|
||
[Install]
|
||
WantedBy=multi-user.target |