修复实盘顶栏误显示模拟盘会话资金:无交易所余额时显示 —,切模式清缓存。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,6 +71,13 @@ def apply_env_reload(env_path: str, get_db: Callable, changed_keys: list[str], g
|
||||
set_trading_mode(get_db, raw)
|
||||
except Exception:
|
||||
pass
|
||||
# 清余额缓存,避免模拟盘资金残留到实盘顶栏
|
||||
try:
|
||||
from app import invalidate_account_balance_cache
|
||||
|
||||
invalidate_account_balance_cache()
|
||||
except Exception:
|
||||
pass
|
||||
from lib.env.env_schema import updates_need_restart
|
||||
|
||||
return {"restart_required": updates_need_restart(groups, changed_keys)}
|
||||
|
||||
Reference in New Issue
Block a user