mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
npm update
This commit is contained in:
@@ -14,11 +14,10 @@ const MAX_ALLOWED_RECOGNIZE_COUNT = 3000 // ~ 500 MB
|
||||
// https://github.com/naptha/tesseract.js/blob/master/docs/api.md
|
||||
let tesseractWorker: TesseractWorker = null
|
||||
export async function initTesseractWorker(): Promise<TesseractWorker> {
|
||||
const worker = createWorker({
|
||||
const worker = await createWorker({
|
||||
cacheMethod: 'refresh',
|
||||
// logger: (m) => console.log(m),
|
||||
})
|
||||
await worker.load()
|
||||
await worker.loadLanguage('hun+eng')
|
||||
await worker.initialize('hun+eng')
|
||||
|
||||
|
@@ -28,7 +28,7 @@ import { Result, Edits } from './actions'
|
||||
import type { Question, QuestionDb, QuestionData } from '../types/basicTypes'
|
||||
import type { WorkerResult } from './classes'
|
||||
|
||||
const threadCount = process.env.NS_THREAD_COUNT || os.cpus().length
|
||||
const threadCount = +process.env.NS_THREAD_COUNT || os.cpus().length
|
||||
|
||||
interface WorkerObj {
|
||||
worker: Worker
|
||||
|
Reference in New Issue
Block a user