Method
constructor
(
path: null | string,
args: string[],
options: any,
debug: boolean
)
Source from the content-addressed store, hash-verified
| 30 | export class PPOCRWorker extends Worker { |
| 31 | private queue: any; |
| 32 | constructor( |
| 33 | path: null | string, |
| 34 | args: string[], |
| 35 | options: any, |
| 36 | debug: boolean |
| 37 | ) { |
| 38 | if (!path) { |
| 39 | path = "PaddleOCR_json.exe"; |
| 40 | } |
| 41 | debug = !!debug; |
| 42 | super(ocr_thread_file, { |
| 43 | workerData: { path, args, options, debug }, |
| 44 | }); |
| 45 | this.queue = new Queue(); |
| 46 | super.once("message", (code: any) => { |
| 47 | console.log(code); |
| 48 | this.queue.status = true; |
| 49 | this.queue.shift(); |
| 50 | }); |
| 51 | } |
| 52 | get length() { |
| 53 | return this.queue.length; |
| 54 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected