fix: price_monitor超时治理——alarm120→300(监控面36→112只后120s在refresh阶段就被杀,zones循环跑不到) + 指标联动整体预算10s(每只5s超时×114=必撞alarm) [603920盲区第三环]
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user