修复模拟盘卖币握锁导致 database is locked 与中控超时离线。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -336,6 +336,12 @@ def notify_options_close(
|
||||
trade_id=head.get("id") if len(rows) == 1 else None,
|
||||
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:
|
||||
for r in pending or rows:
|
||||
|
||||
Reference in New Issue
Block a user