Files
MoFin/archive/hermes-dead-tools-20260820/notify_user5.py
T
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
1.7 KiB
Python
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.
import json, urllib.request
msg = """[笑笑] 系统冗余全面审计完成 — 报告已生成
按你的要求只审计不动手。报告位置:
📄 本地 vault: daily/调研笔记/系统冗余审计-20260720.md
📄 246 Obsidian: daily/系统冗余审计-20260720.md
核心发现(9 类问题):
🔴 高危×3
1. 31 个同名 .py 文件内容分叉(deploy vs MoFin/scripts vs MoFin根 vs .hermes/scripts)——今天"修了还报错"的病根就是这个
2. 数据库碎片化:除主库外还有一个"第三库"(含 17340 行 sector 数据需合并)+ 3 个废弃小库
3. 僵尸进程:xmpp_xiaoguo_bot 以 root 跑了 8 天吃 2.5GB 内存;xiaoguo-tunnel 对着不可达的 Mac Mini 循环重连
🟡 中危×4
4. 三套 dashboard8899/5803/9090+ 两套 health check + 两套 auto_heal
5. 小果生态残留:2 进程 + 4 脚本 + 2 服务 + 2 cron(扫描死了但其余还活着)
6. 26 个 >14 天的遗留 JSON 文件
7. projects/ 与根目录两对重复目录(1.4G + 2.2M)
🟢 低危×2
8. 10 个被禁用的 cron 任务
9. 18 个旧日志 + 旧 .bak 文件
报告末尾有 7 个需要你拍板的问题(Q1-Q7),最关键的两个:
- Q1: xiaoguo gateway (8645) 的"压缩策略"还在用吗?
- Q2: xiaoguo-quick-scan(今天还在跑)和 market_scanner 什么关系?
你看完报告定方向,我再按决定执行。"""
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()[:80])
except Exception as e:
print("XMPP fail:", e)