diff --git a/scripts/mofin_health.py b/scripts/mofin_health.py
index 7ee11786..4191f791 100644
--- a/scripts/mofin_health.py
+++ b/scripts/mofin_health.py
@@ -77,11 +77,13 @@ def load_cron_jobs():
jobs = []
seen = set()
for jf in CRON_FILES:
+ profile_tag = "position-analyst" if "position-analyst" in str(jf) else "default"
try:
for j in json.load(open(jf)).get("jobs", []):
jid = j.get("id", "")
if jid in seen: continue
seen.add(jid)
+ j["profile"] = profile_tag
jobs.append(j)
except: pass
return jobs
@@ -240,6 +242,7 @@ def build_feature_tree(cron_jobs, db_stats):
"status": j.get("last_status", "unknown"),
"last_run": (j.get("last_run_at", "") or "")[:16] if j.get("last_run_at") else "",
"type": "no_agent" if j.get("no_agent") else "LLM",
+ "profile": j.get("profile", "?"),
} for j in matched]
if pipes:
node["pipes"] = pipes
@@ -258,6 +261,7 @@ def build_feature_tree(cron_jobs, db_stats):
"status": j.get("last_status", "unknown"),
"last_run": (j.get("last_run_at", "") or "")[:16] if j.get("last_run_at") else "",
"type": "no_agent" if j.get("no_agent") else "LLM",
+ "profile": j.get("profile", "?"),
}]
}
@@ -365,8 +369,11 @@ def build_report():
flows = scan_data_flows()
script_health = check_scripts()
- # ── 功能树 ──
- feature_tree = build_feature_tree(cron_jobs, db_stats)
+ # ── 功能树(只显示知微的cron)──
+ zhiwei_crons = [j for j in cron_jobs if j.get("profile") == "position-analyst" or j.get("name") in [
+ "cron-推XMPP中继", "数据同步-dashboard", "记忆守卫-每日", "市场数据采集"
+ ]]
+ feature_tree = build_feature_tree(zhiwei_crons, db_stats)
# 递归计算节点状态
def calc_status(node):
if "children" in node:
@@ -435,6 +442,7 @@ def build_report():
"schedule": schedule,
"status": status,
"last_run": last_run,
+ "profile": j.get("profile", "?"),
})
# ── 写JSON ──
diff --git a/static/mofin_health.html b/static/mofin_health.html
index a421c434..83e538fd 100644
--- a/static/mofin_health.html
+++ b/static/mofin_health.html
@@ -48,7 +48,7 @@ td.wrap{white-space:normal;font-size:11px;max-width:200px}
加载中...
🌳 功能树
-
🔧 全部流程/Cron (77)
+
🔧 全部流程/Cron
🗃️ 数据实体
@@ -65,7 +65,7 @@ function switchTab(idx) {
}
function renderFeatureTree(tree) {
- let html = '| 功能模块 | 类型 | 调度 | 状态 | 最后运行 |
';
+ let html = '