🔧 refactor(channel): add validation for CHANNEL_TEST_FREQUENCY in automatic tests

This commit is contained in:
CaIon
2025-07-10 11:31:07 +08:00
parent 78fb457765
commit 338e914a60
2 changed files with 6 additions and 2 deletions

View File

@@ -354,6 +354,10 @@ func TestAllChannels(c *gin.Context) {
}
func AutomaticallyTestChannels(frequency int) {
if frequency <= 0 {
common.SysLog("CHANNEL_TEST_FREQUENCY is not set or invalid, skipping automatic channel test")
return
}
for {
time.Sleep(time.Duration(frequency) * time.Minute)
common.SysLog("testing all channels")