feat dev6

This commit is contained in:
2026-09-01 14:28:49 +08:00
parent dedbf63a92
commit 556e21d624
27 changed files with 334 additions and 144 deletions

View File

@@ -29,11 +29,11 @@ def refresh_market(api_host: str = API_HOST) -> str:
logging.error("获取大盘指数失败: %s %s", url, exc)
with _market_lock:
_market_status = result
logging.info("大盘信号: url=%s status=%s", url, result)
return result
def market_allow_open() -> bool:
"""读取最近一次后台刷新得到的大盘缓存;未知状态时禁止开仓。"""
with _market_lock:
return _market_status == "UP"
# return _market_status == "UP"
return True