refactor: Replace manual goroutine creation with gopool.Go

This commit is contained in:
1808837298@qq.com
2025-02-19 18:38:29 +08:00
parent 2b7435500c
commit 5937d850d9
5 changed files with 11 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/bytedance/gopkg/util/gopool"
"github.com/gin-gonic/gin"
"io"
"log"
@@ -80,9 +81,9 @@ func logHelper(ctx context.Context, level string, msg string) {
if logCount > maxLogCount && !setupLogWorking {
logCount = 0
setupLogWorking = true
go func() {
gopool.Go(func() {
SetupLogger()
}()
})
}
}