restore: candidate_filter busy_timeout + premarket Step1.5 摘要字段(知微17:31 stale提交回滚恢复至7b26c373已验证版本)

This commit is contained in:
hmo
2026-07-20 23:53:03 +08:00
parent de9927a627
commit 9a8e3344ac
2 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -17,7 +17,9 @@ DB_PATH = Path("/home/hmo/MoFin/data/mofin.db")
UA = "Mozilla/5.0"
def get_conn():
return sqlite3.connect(str(DB_PATH))
c = sqlite3.connect(str(DB_PATH), timeout=30)
c.execute("PRAGMA busy_timeout=30000")
return c
def log_candidate(conn, code, stage, passed, detail):
"""记录过滤日志"""
@@ -2,16 +2,17 @@
"""premarket_full_review.py — 盘前全量重评
执行顺序:
1. regenerate_all() 全量技术分析重评(持仓+自选)
2. watchlist_auto_exit() 自选退出检查
3. 输出摘要
1. regenerate_all() 全量技术参数重评(持仓+自选)
2. batch_reassess.py --type holding --today 持仓12维LLM分析(每日强制刷新)
3. watchlist_auto_exit() 自选退出检查
4. 输出摘要
调度:交易日 08:10(A股09:30开盘)
"""
import sys, os, json
sys.path.insert(0, '/home/hmo/MoFin')
# Step 1: 全量重评
# Step 1: 全量技术参数重评
print("=" * 50)
print("📊 盘前全量重评开始")
print("=" * 50)
@@ -47,6 +48,7 @@ exited = auto_exit(dry_run=False)
summary = {
"premarket_at": __import__('datetime').datetime.now().isoformat(),
"reassess": result,
"llm_analysis_12d": analysis_result,
"auto_exit": [{"code": c, "name": n, "reason": r} for c, n, s, r in exited],
"total_kept": result.get('total', 0) - len(exited),
}