修复粉尘桥拦开仓,并继续消除模拟盘嵌套握锁导致的 database is locked。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 11:28:29 +08:00
parent 030b237981
commit ea3e029eb9
7 changed files with 196 additions and 33 deletions
+6
View File
@@ -232,6 +232,12 @@ def notify_options_open(
trade_id=trade_id,
premium_ccy=ccy,
)
# 推送前先提交,避免握锁等 webhook 导致模拟盘 database is locked
if conn is not None:
try:
conn.commit()
except Exception:
pass
ok = notify_options_send(cfg, msg)
if ok and conn is not None and trade_id is not None:
conn.execute(