Files
xxm c68f987653 chore(cleansweep): 代码大扫除——归档hermes 111个死工具+4个废弃scanner,收敛MoFin/scripts重复副本,删除根旧版mo_models
- archive/hermes-dead-tools-20260820/: hermes独有不在cron不被import的111个一次性排查/测试工具
- archive/hermes-dead-tools-20260820/: 4个废弃scanner(btd1_v3/market_scanner/market_thermometer已废弃/s2v2)
- archive/legacy-cleanup-20260820/: MoFin根2旧版(mo_models/technical_analysis)+/home/hmo/scripts无引用旧项目+MoFin/scripts重复prepare_report_data
- 删除MoFin根mo_models.py(根旧版,deploy/profile-scripts权威保留)
- 保留: mofin_db.py/mo_data.py硬链接(server.py多层sys.path需各目录访问同一inode,非冗余)
- fix_gateway.py保留(Gateway看门狗fix_gateway_port.py的活跃依赖,勿误删)
- 验证: cron所有脚本引用无缺失, key模块import正常
- hermes独有从116收敛到5核心(alert_logger/market_screener/prepare_report_data/self_todo_executor_v2/xmpp_zhiwei_bot)
2026-08-20 10:36:25 +08:00

38 lines
2.3 KiB
Python
Raw Permalink 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.
import json, urllib.request
msg = """[笑笑] 今日F健康全量错误清理 — 完成汇报
你批评得对,之前修了部分没修全部,这次把 32 个 error/异常任务全部逐项过了一遍。
■ 先说结论:真错误比看上去少得多,大部分是监控假警报
【今天还在犯的真错误 — 已全部修复并验证】
1. price_monitor L584 shares=None 崩溃 → 修后完整跑通 3m7s(39只重评+区间触发+推送)
2. market_insight L142 net_inflow=None 崩溃 → 修后 0.3s 出 5 条洞察
3. promote_candidates DB锁 → 加 busy_timeout25s 提拔 19 只
4. premarket 120s 超时 → 12维分析改为后台分离启动(cron 不再被卡死)
5. 全局脚本超时 120s→600smofin_health/market_watch/memory_guardian 超时全消)
6. 隐性部署缺陷:scp 换文件会破坏硬链接,cron 一直在跑旧代码(这就是 promote 修了还报错的原因)→ 新增 sync_profile_scripts.sh,部署后一键重链
【假警报 — 监控逻辑已修】
7. "数据管道停滞14天":假的。数据早就迁到 DBmtf_cache(0.4h前)/macro_context(2h)/market_snapshots(2h)/live_prices(0.4h) 全是新鲜的。mofin_health 现在查 DB 表新鲜度(db_freshness),不再拿遗留 JSON 的 mtime 报警
8. "价格事件零记录":假的。事件写在 price_events.json(今天 17:06 宏华数科入区),DB 表才是旧的
9. "suggestions表不存在":没有任何脚本用这个表,不存在的问题
10. "newspaper3k缺失":当前代码不需要它(stderr警告而已,不致命)
【已验证修复生效】
- 周末 Blocked 任务(hardlink修复):vacuum_state_db 实跑通过
- default gateway 8642 在 key6 上 LLM 正常
- 全部 5 张数据表新鲜度 <24h,无一 warn
wiki-self-growth 03:04 的 key1 429 是 key6 完全生效前的残留,明早 03:00 的运行会自证。禁用任务(8个)未动,如需启用哪些跟我说。
代码已提交并合并到 246c02caeb1)。"""
payload = json.dumps({"to": "hmo@yoin.fun", "body": msg, "type": "chat"}).encode()
req = urllib.request.Request("http://127.0.0.1:5805/", data=payload,
headers={"Content-Type": "application/json"})
try:
print("XMPP:", urllib.request.urlopen(req, timeout=10).read().decode()[:100])
except Exception as e:
print("XMPP fail:", e)