refactor(ocr): remove subprocess mode — HTTP only
- ocr.js: Removed all subprocess/spawn logic (spawn, fs, path, process imports, resolveWorkerCommand, buildPythonPath, buildWorkerError, callOcrViaSubprocess, resolveOcrMode, runOcrCommand, etc.) HTTP is now the only mode. Added validation when OCR_BASE_URL is not configured. ~281 lines → ~80 lines. - default.cjs: Removed projectRoot from ocr config (kept path import for data.root) - runtime.js: Removed OCR_PROJECT_ROOT env var parsing - runtime-config.js: Removed projectRoot from ocr type definition All 5 exports preserved: recognizeTencentCaptcha, recognizeImageCaptcha, batchRecognizeTencentCaptcha, warmupLocalOcrWorker, closeLocalOcrWorker
This commit is contained in:
@@ -19,7 +19,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
ocr: {
|
||||
projectRoot: path.resolve(__dirname, '../subservices/ocr-worker'),
|
||||
baseUrl: '',
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user