chore: UpdateMidjourneyTaskBulk with SafeGoroutine

This commit is contained in:
CaIon
2024-01-12 18:38:45 +08:00
parent 9c8732cb77
commit d82930f7b5
2 changed files with 3 additions and 7 deletions
+3 -1
View File
@@ -85,7 +85,9 @@ func main() {
}
go controller.AutomaticallyTestChannels(frequency)
}
go controller.UpdateMidjourneyTaskBulk()
common.SafeGoroutine(func() {
controller.UpdateMidjourneyTaskBulk()
})
if os.Getenv("BATCH_UPDATE_ENABLED") == "true" {
common.BatchUpdateEnabled = true
common.SysLog("batch update enabled with interval " + strconv.Itoa(common.BatchUpdateInterval) + "s")