From 0513522e5a5ba30e27ef615db54fa589229609e6 Mon Sep 17 00:00:00 2001 From: hmo Date: Fri, 24 Jul 2026 14:41:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20MoFin/scripts/=E6=AD=BB=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E5=85=A8=E9=83=A8=E6=94=B9=E6=8C=87deploy/profile-scr?= =?UTF-8?q?ipts/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - promote/review_needed_watchdog引用已删除的per_stock_reassess.py - meta_growth→hardcode_scanner, mofin_collect→stock_quote, stale_detector同 - 清影子副本的连锁遗留 --- deploy/profile-scripts/meta_growth.py | 2 +- deploy/profile-scripts/mofin_collect.py | 2 +- deploy/profile-scripts/promote_candidates.py | 2 +- deploy/profile-scripts/review_needed_watchdog.py | 2 +- deploy/profile-scripts/stale_detector.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deploy/profile-scripts/meta_growth.py b/deploy/profile-scripts/meta_growth.py index 49072b7d..173f4349 100644 --- a/deploy/profile-scripts/meta_growth.py +++ b/deploy/profile-scripts/meta_growth.py @@ -19,7 +19,7 @@ import os import sys import datetime -SCANNER_PATH = "/home/hmo/MoFin/scripts/hardcode_scanner.py" +SCANNER_PATH = "/home/hmo/MoFin/deploy/profile-scripts/hardcode_scanner.py" PROFILE_SCANNER = "/home/hmo/.hermes/profiles/position-analyst/scripts/hardcode_scanner.py" REGISTRY_PATH = "/home/hmo/web-dashboard/data/growth_registry.json" EXTENSION_MARKER = "# 扩展点 — meta_growth 在此追加新规则" diff --git a/deploy/profile-scripts/mofin_collect.py b/deploy/profile-scripts/mofin_collect.py index 904e7bdb..f234a11e 100644 --- a/deploy/profile-scripts/mofin_collect.py +++ b/deploy/profile-scripts/mofin_collect.py @@ -249,7 +249,7 @@ for script, timeout in SCRIPTS: # LLM 禁止自行调用原始API解析价格 PRICE_SCRIPT = BASE / "stock_quote.py" if not PRICE_SCRIPT.exists(): - PRICE_SCRIPT = Path("/home/hmo/MoFin/scripts/stock_quote.py") + PRICE_SCRIPT = Path("/home/hmo/MoFin/deploy/profile-scripts/stock_quote.py") if PRICE_SCRIPT.exists(): print("--- stock_quote.py ---", flush=True) try: diff --git a/deploy/profile-scripts/promote_candidates.py b/deploy/profile-scripts/promote_candidates.py index d0602443..1c8aa32a 100644 --- a/deploy/profile-scripts/promote_candidates.py +++ b/deploy/profile-scripts/promote_candidates.py @@ -162,7 +162,7 @@ def main(): if newly_added: try: import subprocess as _sp - r = _sp.run(["python3", "/home/hmo/MoFin/scripts/per_stock_reassess.py", code], + r = _sp.run(["python3", "/home/hmo/MoFin/deploy/profile-scripts/per_stock_reassess.py", code], capture_output=True, text=True, timeout=480) if r.returncode == 0: print(f" 重评完成", flush=True) diff --git a/deploy/profile-scripts/review_needed_watchdog.py b/deploy/profile-scripts/review_needed_watchdog.py index 82286fdb..13751ed6 100644 --- a/deploy/profile-scripts/review_needed_watchdog.py +++ b/deploy/profile-scripts/review_needed_watchdog.py @@ -64,7 +64,7 @@ def main(): print(f" 🔄 {name}({code}) 第{retries}次重试...") import subprocess r = subprocess.run( - [sys.executable, "/home/hmo/MoFin/scripts/per_stock_reassess.py", code], + [sys.executable, "/home/hmo/MoFin/deploy/profile-scripts/per_stock_reassess.py", code], capture_output=True, text=True, timeout=30 ) out = (r.stdout or "") + (r.stderr or "") diff --git a/deploy/profile-scripts/stale_detector.py b/deploy/profile-scripts/stale_detector.py index fc805b83..30e1450c 100644 --- a/deploy/profile-scripts/stale_detector.py +++ b/deploy/profile-scripts/stale_detector.py @@ -26,7 +26,7 @@ def fetch_prices(codes): try: import subprocess script = None - for p in ["/home/hmo/MoFin/scripts/stock_quote.py", "/home/hmo/MoFin/stock_quote.py"]: + for p in ["/home/hmo/MoFin/deploy/profile-scripts/stock_quote.py", "/home/hmo/MoFin/stock_quote.py"]: if os.path.exists(p): script = p break @@ -144,7 +144,7 @@ def main(): if reassess_scripts: # 调用 per_stock_reassess(每轮最多5只,防LLM慢导致整批超时;其余下轮继续) reassess_path = None - for p in ['/home/hmo/MoFin/scripts/per_stock_reassess.py', + for p in ['/home/hmo/MoFin/deploy/profile-scripts/per_stock_reassess.py', '/home/hmo/.hermes/profiles/position-analyst/scripts/per_stock_reassess.py']: if os.path.exists(p): reassess_path = p