From a288316a5e28c9c83560b441dc64bd13bef1466f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Wed, 8 Jul 2026 12:13:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=81=A5=E5=BA=B7JSON=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=86=99=E5=85=A5static=E4=BE=9Bdashboard=20serve?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/mofin_health.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/mofin_health.py b/scripts/mofin_health.py index 54a1f648..0e1871c6 100644 --- a/scripts/mofin_health.py +++ b/scripts/mofin_health.py @@ -12,6 +12,7 @@ from datetime import datetime, timezone DATA_DIR = Path("/home/hmo/MoFin/data") WEB_DATA = Path("/home/hmo/web-dashboard/data") +STATIC_DIR = Path("/home/hmo/web-dashboard/static") PROFILE_SCRIPTS = Path("/home/hmo/.hermes/profiles/position-analyst/scripts") CRON_FILES = [ "/home/hmo/.hermes/profiles/position-analyst/cron/jobs.json", @@ -219,6 +220,9 @@ def build_report(): out_path = WEB_DATA / "mofin_health.json" with open(out_path, "w") as f: json.dump(report, f, ensure_ascii=False, indent=2) + # 也写到static目录供dashboard直接serve + with open(STATIC_DIR / "mofin_health.json", "w") as f: + json.dump(report, f, ensure_ascii=False, indent=2) print(f"[SILENT] mofin_health.json written ({len(entities)} entities, {len(pipelines)} pipelines)") if __name__ == "__main__":