修复模拟盘卖币握锁导致 database is locked 与中控超时离线。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -573,16 +573,15 @@ def options_monitor_loop(
|
||||
cfg=pe_cfg,
|
||||
ex=pe_cfg.get("exchange_options"),
|
||||
)
|
||||
if sync_trades_fn is not None:
|
||||
try:
|
||||
conn.commit()
|
||||
except Exception:
|
||||
pass
|
||||
sync_trades_fn(conn)
|
||||
conn.commit()
|
||||
finally:
|
||||
conn.close()
|
||||
# 币本位扫尾卖回:必须在监控连接关闭之后
|
||||
# 同步/卖币必须在监控连接关闭之后
|
||||
if sync_trades_fn is not None:
|
||||
try:
|
||||
sync_trades_fn(None)
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
pe_sell = dict(profit_exit_cfg or {})
|
||||
pe_sell.setdefault("send_wechat", send_wechat)
|
||||
|
||||
Reference in New Issue
Block a user