mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-01 00:27:30 +00:00
fix(channel-monitor-v2): default mode v1 and gentle adaptive backfill
Default channel_monitor_mode to v1 (opt-in V2) so upgrades keep active probes; existing explicit v2 rows are left alone via ON CONFLICT DO NOTHING plus migration checksum compatibility for already-applied 195. V2 first-enable backfill no longer compresses ticks to 5s or uses 24h chunks. Each tick does recent overlap plus at most one historical chunk with depth-based ceilings (2h/4h/6h), adaptive grow/shrink, and failure backoff. Error request_id dedup is bounded by a 90-minute lookback so ops_error_logs is not scanned for full history. Also align hide_throughput parse default with privacy-preserving public runtime (missing key → true).
This commit is contained in:
@@ -160,11 +160,11 @@ export function isChannelMonitorRouteEnabled(): boolean {
|
||||
|
||||
export type ChannelMonitorMode = 'v1' | 'v2'
|
||||
|
||||
/** Exclusive channel-monitor implementation. Invalid/missing → v2. */
|
||||
/** Exclusive channel-monitor implementation. Invalid/missing → v1 (opt-in to v2). */
|
||||
export function getChannelMonitorMode(): ChannelMonitorMode {
|
||||
const appStore = useAppStore()
|
||||
const mode = appStore.cachedPublicSettings?.channel_monitor_mode
|
||||
return mode === 'v1' ? 'v1' : 'v2'
|
||||
return mode === 'v2' ? 'v2' : 'v1'
|
||||
}
|
||||
|
||||
export function isChannelMonitorV1Mode(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user