feat: add UPDATE_TASK env

This commit is contained in:
CalciumIon
2024-07-18 17:26:21 +08:00
parent 70491ea1bb
commit 14bf865034
3 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import (
"log"
"net/http"
"one-api/common"
"one-api/constant"
"one-api/controller"
"one-api/middleware"
"one-api/model"
@@ -89,7 +90,7 @@ func main() {
}
go controller.AutomaticallyTestChannels(frequency)
}
if common.IsMasterNode {
if common.IsMasterNode && constant.UpdateTask {
common.SafeGoroutine(func() {
controller.UpdateMidjourneyTaskBulk()
})