mirror of
https://ghfast.top/https://github.com/aeroxw/tick-stock-panel.git
synced 2026-09-12 17:54:15 +08:00
merge: 同步 main (辐射本地读 + 传输压缩/网络设置) 到全量分钟分支
冲突两处均为 minute-refresh status 字段两侧各自新增, 两者全保留 (healthy + provider/provider_effective/repair_only)。
This commit is contained in:
@@ -358,7 +358,7 @@ class MinuteRefreshService:
|
||||
def is_healthy(self) -> bool:
|
||||
"""读侧 freshness 判定: 本地 kline_minute 分区是否正被服务持续写入。
|
||||
|
||||
条件: 偏好开启 + 轮询线程存活 + 最近一轮距现在 ≤ max(2×间隔, 30s)。
|
||||
条件: 偏好开启 + 轮询线程存活 + 最近一轮距现在 ≤ max(2*间隔, 30s)。
|
||||
健康时消费方 (自选分时等) 可信任本地分区、跳过批量补拉;
|
||||
连续失败轮不更新 last_round_at → 自动超时判不健康, 无需单独盯 last_error。
|
||||
"""
|
||||
@@ -385,6 +385,7 @@ class MinuteRefreshService:
|
||||
return {
|
||||
"enabled": enabled,
|
||||
"running": running,
|
||||
"healthy": self.is_healthy(),
|
||||
"provider": self.active_provider(),
|
||||
"provider_effective": self._resolve_custom()[1],
|
||||
"repair_only": self.repair_only(),
|
||||
|
||||
Reference in New Issue
Block a user