This commit is contained in:
2026-07-27 21:29:36 +08:00
parent 18cf7ae079
commit 6247d68fb5
10 changed files with 849 additions and 128 deletions
+10
View File
@@ -109,6 +109,16 @@ class Settings(BaseSettings):
# 页面改版导致买到远超预期的订单。设为 0 表示不设上限(不建议)。
order_max_total_yen: int = 30000
# ---- 自动重登(仅交易服务,需要 account.yaml)----
# 检测到登录态失效时,是否在 require_logged_in 内自动触发重登。需要项目根
# 存在 account.yaml(含明文密码,已在 .gitignore 排除)。未配置或文件缺失
# 时退化为原行为(抛 NotLoggedInError 让 worker 转 needs_human)。
relogin_enabled: bool = True
# 自动重登(含人工 fallback 等待验证码)的最长总耗时。超时即判定失败。
# worker 内触发时整个任务会被卡住这段时间,所以不宜过长;本地机无人值守时
# 可以设小(如 60)尽快失败转 needs_human。
relogin_timeout_seconds: int = 300
# ---- 下单任务网关(仅网关进程 app.gateway.main 使用)----
# 网关的 SQLite 文件路径(相对项目根目录)。任务队列与状态镜像都在这里,
# 部署时务必放在持久化卷上,丢了等于丢了一批下单任务。