Files
MoFin/archive/20260722-scripts-cleanup/notify_user5.py
T

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)