From 4e10ca9ab19ec3c00911ab7587d4b4cb67333196 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 10 Aug 2026 15:18:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20candidate=5Ffilter=20=E5=8A=A0=E5=8D=95?= =?UTF-8?q?=E4=BE=8B=E5=AE=88=E5=8D=AB=EF=BC=88=E8=A7=84=E8=8C=835.3?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/candidate_filter.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deploy/profile-scripts/candidate_filter.py b/deploy/profile-scripts/candidate_filter.py index fe8b981a..d5fc1a52 100644 --- a/deploy/profile-scripts/candidate_filter.py +++ b/deploy/profile-scripts/candidate_filter.py @@ -373,6 +373,15 @@ def stage5_fundamental(code, name, price): # ── 主流程 ── def main(): + # ── 单例守卫(规范5.3,2026-08-10)── + import fcntl + lock_f = open("/tmp/candidate_filter.lock", "w") + try: + fcntl.flock(lock_f, fcntl.LOCK_EX | fcntl.LOCK_NB) + except OSError: + print("[FILTER] 已有实例在运行,退出") + return + stage_filter = None single_code = None for i, arg in enumerate(sys.argv[1:]):