chore: gopool

This commit is contained in:
CalciumIon
2024-07-19 01:07:37 +08:00
parent 261ba5a813
commit d06018cd3f
14 changed files with 77 additions and 115 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ package main
import (
"embed"
"fmt"
"github.com/bytedance/gopkg/util/gopool"
"github.com/gin-contrib/sessions"
"github.com/gin-contrib/sessions/cookie"
"github.com/gin-gonic/gin"
@@ -91,10 +92,10 @@ func main() {
go controller.AutomaticallyTestChannels(frequency)
}
if common.IsMasterNode && constant.UpdateTask {
common.SafeGoroutine(func() {
gopool.Go(func() {
controller.UpdateMidjourneyTaskBulk()
})
common.SafeGoroutine(func() {
gopool.Go(func() {
controller.UpdateTaskBulk()
})
}