Allow scheduled CTP connect when auto-connect setting is off.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -35,11 +35,11 @@ LIVE_FIELDS: tuple[tuple[str, str, str, str], ...] = (
|
||||
PASSWORD_DB_KEYS = frozenset({"simnow_password", "ctp_live_password"})
|
||||
|
||||
CTP_AUTO_CONNECT_KEY = "ctp_auto_connect"
|
||||
CTP_DISABLED_HINT = "CTP 自动连接已关闭(非交易时段建议关闭,避免反复连接失败)"
|
||||
CTP_DISABLED_HINT = "CTP 自动连接已关闭(非交易时段不重连;开盘前 30 分钟仍会按计划连接)"
|
||||
|
||||
|
||||
def is_ctp_auto_connect_enabled(get_setting=None) -> bool:
|
||||
"""系统设置:是否允许 CTP 连接(含自动重连、盘前连接、手动连接)。"""
|
||||
"""系统设置:是否允许手动连接及非交易时段自动重连(盘前/交易时段计划连接不受此限制)。"""
|
||||
if get_setting is None:
|
||||
from fee_specs import get_setting as _gs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user