Skip to content

Commit

Permalink
Add from cache message when loading traineddata
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromewu committed Mar 25, 2020
1 parent ecf0350 commit 7a398f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/worker-script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 7a398f6

Please sign in to comment.