refactor: remove duplicate scripts + JSON constants + update docs

This commit is contained in:
知微
2026-07-04 09:30:50 +08:00
parent 7d6b08953c
commit 8b114d6e9e
26 changed files with 2200 additions and 4913 deletions
-9
View File
@@ -15,12 +15,7 @@ from datetime import datetime
from mo_data import read_decisions, read_portfolio
from mo_data import read_decisions, read_portfolio
DECISIONS_PATH = "/home/hmo/web-dashboard/data/decisions.json"
OUTPUT_PATH = "/home/hmo/web-dashboard/data/strategy_staleness_report.json"
PORTFOLIO_PATH = "/home/hmo/web-dashboard/data/portfolio.json"
# Fallback: if new path not found, use old path
FALLBACK_PATH = "/home/hmo/data/decisions.json"
WARN_DAYS = 14 # 超过14天未更新→警告
CRITICAL_DAYS = 21 # 超过21天→严重警告
@@ -57,10 +52,6 @@ def parse_buy_zone(current):
return None, None
def main():
# Try new path first, fall back to old format
path = DECISIONS_PATH if os.path.exists(DECISIONS_PATH) else FALLBACK_PATH
is_new_format = (path == DECISIONS_PATH)
data = read_decisions()
# Filter: exclude closed strategies