feat(monitor_setting): implement automatic channel testing configuration

This commit is contained in:
CaIon
2025-09-03 14:00:52 +08:00
parent ebaaecb9d9
commit 56fc3441da
8 changed files with 107 additions and 103 deletions

10
main.go
View File

@@ -94,13 +94,9 @@ func main() {
}
go controller.AutomaticallyUpdateChannels(frequency)
}
if os.Getenv("CHANNEL_TEST_FREQUENCY") != "" {
frequency, err := strconv.Atoi(os.Getenv("CHANNEL_TEST_FREQUENCY"))
if err != nil {
common.FatalLog("failed to parse CHANNEL_TEST_FREQUENCY: " + err.Error())
}
go controller.AutomaticallyTestChannels(frequency)
}
go controller.AutomaticallyTestChannels()
if common.IsMasterNode && constant.UpdateTask {
gopool.Go(func() {
controller.UpdateMidjourneyTaskBulk()