mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 04:40:59 +00:00
fix: reduce auto test channel sleep duration to 1 minute
This commit is contained in:
@@ -620,13 +620,13 @@ func AutomaticallyTestChannels() {
|
|||||||
autoTestChannelsOnce.Do(func() {
|
autoTestChannelsOnce.Do(func() {
|
||||||
for {
|
for {
|
||||||
if !operation_setting.GetMonitorSetting().AutoTestChannelEnabled {
|
if !operation_setting.GetMonitorSetting().AutoTestChannelEnabled {
|
||||||
time.Sleep(10 * time.Minute)
|
time.Sleep(1 * time.Minute)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for {
|
for {
|
||||||
frequency := operation_setting.GetMonitorSetting().AutoTestChannelMinutes
|
frequency := operation_setting.GetMonitorSetting().AutoTestChannelMinutes
|
||||||
time.Sleep(time.Duration(int(math.Round(frequency))) * time.Minute)
|
time.Sleep(time.Duration(int(math.Round(frequency))) * time.Minute)
|
||||||
common.SysLog(fmt.Sprintf("automatically test channels with interval %d minutes", frequency))
|
common.SysLog(fmt.Sprintf("automatically test channels with interval %f minutes", frequency))
|
||||||
common.SysLog("automatically testing all channels")
|
common.SysLog("automatically testing all channels")
|
||||||
_ = testAllChannels(false)
|
_ = testAllChannels(false)
|
||||||
common.SysLog("automatically channel test finished")
|
common.SysLog("automatically channel test finished")
|
||||||
|
|||||||
Reference in New Issue
Block a user