Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-01-29 12:09:57 +08:00
commit eb71bd2083
2 changed files with 4 additions and 2 deletions

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{}) {

View file

@ -69,6 +69,8 @@ func Tesseract(imgAbsPath string) string {
return ""
}
defer logging.Recover()
if !IsTesseractExtractable(imgAbsPath) {
return ""
}