🎨 降低自动 OCR 时的并发数

This commit is contained in:
Liang Ding 2023-01-29 11:36:53 +08:00
parent 8c83ea6a52
commit 9c08bcd958
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -34,8 +34,8 @@ func autoOCRAssets() {
assets := getUnOCRAssetsAbsPaths()
if 0 < len(assets) {
poolSize := runtime.NumCPU()
if 4 < poolSize {
poolSize = 4
if 2 < poolSize {
poolSize = 2
}
waitGroup := &sync.WaitGroup{}
p, _ := ants.NewPoolWithFunc(poolSize, func(arg interface{}) {