From 936a9b83589114e66f14b323bf327c645542c661 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 24 Aug 2026 14:52:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20price=5Fmonitor=E8=B6=85=E6=97=B6?= =?UTF-8?q?=E6=B2=BB=E7=90=86=E2=80=94=E2=80=94alarm120=E2=86=92300(?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E9=9D=A236=E2=86=92112=E5=8F=AA=E5=90=8E120s?= =?UTF-8?q?=E5=9C=A8refresh=E9=98=B6=E6=AE=B5=E5=B0=B1=E8=A2=AB=E6=9D=80,z?= =?UTF-8?q?ones=E5=BE=AA=E7=8E=AF=E8=B7=91=E4=B8=8D=E5=88=B0)=20+=20?= =?UTF-8?q?=E6=8C=87=E6=A0=87=E8=81=94=E5=8A=A8=E6=95=B4=E4=BD=93=E9=A2=84?= =?UTF-8?q?=E7=AE=9710s(=E6=AF=8F=E5=8F=AA5s=E8=B6=85=E6=97=B6=C3=97114=3D?= =?UTF-8?q?=E5=BF=85=E6=92=9Ealarm)=20[603920=E7=9B=B2=E5=8C=BA=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E7=8E=AF]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/price_monitor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index 1916ecd6..2d490b9e 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -412,10 +412,14 @@ def refresh_data_prices(): (code, p, cp) ) - # 实时技术指标联动更新 + # 实时技术指标联动更新(2026-08-24 整体预算10s:每只默认5s超时×114只=必撞alarm, + # 撞锁时快速跳过,指标晚一轮更新无伤,zones止损判定才是命脉) try: from realtime_indicators import update_single + _ri_start = time.time() for h in db_holdings: + if time.time() - _ri_start > 10: + break _ri_code = h.get("code", "") _ri_price = h.get("price", 0) if _ri_code and _ri_price: @@ -631,7 +635,7 @@ def run_once(round_label=""): pass with open(_lk, "w") as _f: _f.write(str(os.getpid())) - signal.alarm(120) # 硬上限120s,超时自动清理锁退出 + signal.alarm(300) # 2026-08-24 120→300:监控面扩到112只+撞锁等待,120s在refresh阶段就被杀,zones循环跑不到(603920盲区第三环) label = f" [{round_label}]" if round_label else "" start = time.time()