Use __filename for worker instead

This commit is contained in:
Surma
2020-09-09 23:43:30 +01:00
parent c37f798565
commit c9a271f57a

View File

@ -109,7 +109,7 @@ async function processFiles(files) {
await fsp.mkdir(program.outputDir, { recursive: true });
const pool = Array.from(
{ length: cpus().length },
() => new Worker(process.argv[1])
() => new Worker(__filename)
);
let i = 0;
const jobs = [];