소스 검색

Merge pull request #2002 from qixing-jk/fix/dynamic-frequency-updates

fix(channel): handle dynamic frequency updates
Seefs 4 달 전
부모
커밋
df0ae9294d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      controller/channel-test.go

+ 2 - 2
controller/channel-test.go

@@ -622,10 +622,10 @@ func AutomaticallyTestChannels() {
 				time.Sleep(10 * time.Minute)
 				continue
 			}
-			frequency := operation_setting.GetMonitorSetting().AutoTestChannelMinutes
-			common.SysLog(fmt.Sprintf("automatically test channels with interval %d minutes", frequency))
 			for {
+				frequency := operation_setting.GetMonitorSetting().AutoTestChannelMinutes
 				time.Sleep(time.Duration(frequency) * time.Minute)
+				common.SysLog(fmt.Sprintf("automatically test channels with interval %d minutes", frequency))
 				common.SysLog("automatically testing all channels")
 				_ = testAllChannels(false)
 				common.SysLog("automatically channel test finished")