Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
eb71bd2083
2 changed files with 4 additions and 2 deletions
|
@ -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{}) {
|
||||
|
|
|
@ -69,6 +69,8 @@ func Tesseract(imgAbsPath string) string {
|
|||
return ""
|
||||
}
|
||||
|
||||
defer logging.Recover()
|
||||
|
||||
if !IsTesseractExtractable(imgAbsPath) {
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue