feat(channels): add auto-disable-only channel test mode (#6728)

This commit is contained in:
Seefs
2026-08-10 12:47:44 +08:00
committed by GitHub
parent 823e26304a
commit 5d3423bec1
13 changed files with 146 additions and 11 deletions
+4 -1
View File
@@ -15,6 +15,7 @@ type MonitorSetting struct {
const (
ChannelTestModeScheduledAll = "scheduled_all"
ChannelTestModeAutoBanOnly = "auto_ban_only"
ChannelTestModePassiveRecovery = "passive_recovery"
)
@@ -45,7 +46,9 @@ func GetMonitorSetting() *MonitorSetting {
monitorSetting.AutoTestChannelEnabled = parsed
}
}
if monitorSetting.ChannelTestMode != ChannelTestModePassiveRecovery {
switch monitorSetting.ChannelTestMode {
case ChannelTestModeAutoBanOnly, ChannelTestModePassiveRecovery:
default:
monitorSetting.ChannelTestMode = ChannelTestModeScheduledAll
}
return &monitorSetting