Commit d82930f7 by CaIon

chore: UpdateMidjourneyTaskBulk with SafeGoroutine

parent 9c8732cb
......@@ -148,12 +148,6 @@ import (
*/
func UpdateMidjourneyTaskBulk() {
//revocer
defer func() {
if err := recover(); err != nil {
log.Printf("UpdateMidjourneyTask panic: %v", err)
}
}()
//imageModel := "midjourney"
ctx := context.TODO()
for {
......
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment