From 7a398f6420683c28a7ababc644da02c176e6c702 Mon Sep 17 00:00:00 2001 From: jeromewu Date: Wed, 25 Mar 2020 10:49:15 +0000 Subject: [PATCH] Add from cache message when loading traineddata --- src/worker-script/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/worker-script/index.js b/src/worker-script/index.js index d26a5e7..5166ab8 100644 --- a/src/worker-script/index.js +++ b/src/worker-script/index.js @@ -84,6 +84,7 @@ const loadLanguage = async ({ const _data = await readCache(`${cachePath || '.'}/${lang}.traineddata`); if (typeof _data !== 'undefined') { log(`[${workerId}]: Load ${lang}.traineddata from cache`); + res.progress({ workerId, status: 'loading language traineddata (from cache)', progress: 0.5 }); data = _data; } else { throw Error('Not found in cache');