From ef835c12412a98efe4eaaa594e9b47341b18be32 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 24 Aug 2026 20:17:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20candidate=5Ffilter=E4=BF=AE3=E2=80=94?= =?UTF-8?q?=E2=80=94S4=E6=97=A0=E8=B5=84=E9=87=91=E6=B5=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=94=B9=E4=B8=AD=E6=80=A7=E9=80=9A=E8=BF=87(cache?= =?UTF-8?q?=E5=8F=AA=E8=A6=86=E7=9B=96=E6=B1=A0=E5=86=85,=E6=B1=A0?= =?UTF-8?q?=E5=A4=96=E4=B8=8D=E8=AF=A5=E5=8E=8B=E5=88=86),busy=5Ftimeout30?= =?UTF-8?q?=E2=86=9260(6worker=E5=B9=B6=E5=8F=91=E5=86=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/candidate_filter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/candidate_filter.py b/deploy/profile-scripts/candidate_filter.py index cb927d03..84b46b24 100644 --- a/deploy/profile-scripts/candidate_filter.py +++ b/deploy/profile-scripts/candidate_filter.py @@ -25,7 +25,7 @@ UA = "Mozilla/5.0" def get_conn(): c = sqlite3.connect(str(DB_PATH), timeout=30) - c.execute("PRAGMA busy_timeout=30000") + c.execute("PRAGMA busy_timeout=60000") # 2026-08-24 30→60: 6worker并发写等待 return c def log_candidate(conn, code, stage, passed, detail): @@ -193,7 +193,8 @@ def stage4_capital_flow(code, name): stocks = (_j.loads(r[0]) or {}).get("stocks") or {} info = stocks.get(raw) if not info or not info.get("flow"): - return False, 0, "无资金流数据" + # 2026-08-24 中性化:cache只覆盖池内股票,池外候选无数据不该压分(S4设计是筛资金差,不是筛没数据) + return True, 1, "无资金流数据(中性)" flow = info["flow"] # [{date, main_net, super_large, ...}] 日期升序 recent = flow[-3:] # 近3日 score = 0