@ms-cloudpack/worker-pool
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -32,3 +32,2 @@ import { parentPort } from 'worker_threads'; | ||
await beforeEach?.(); | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument | ||
response.result = await method(...(args || [])); | ||
@@ -35,0 +34,0 @@ } |
@@ -52,3 +52,6 @@ import { Worker } from 'worker_threads'; | ||
_createWorker() { | ||
const uniqueWorker = { id: this._workers.length, worker: new Worker(this._entryPath) }; | ||
const uniqueWorker = { | ||
id: this._workers.length, | ||
worker: new Worker(this._entryPath, { stdout: true, stderr: true }), | ||
}; | ||
const { worker, id } = uniqueWorker; | ||
@@ -67,2 +70,8 @@ // don't hold the process open if only the worker is left | ||
}); | ||
worker.stdout.on('data', (data) => { | ||
console.debug(`[${this._entryPath} worker stdout] ${data}`); | ||
}); | ||
worker.stderr.on('data', (data) => { | ||
console.debug(`[${this._entryPath} worker stderr] ${data}`); | ||
}); | ||
worker.on('error', (error) => { | ||
@@ -69,0 +78,0 @@ const entry = this._activeEntries[id]; |
{ | ||
"name": "@ms-cloudpack/worker-pool", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "General worker pool helper.", | ||
@@ -31,13 +31,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@ms-cloudpack/eslint-plugin-internal": "*", | ||
"@ms-cloudpack/scripts": "*" | ||
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1", | ||
"@ms-cloudpack/scripts": "^0.0.1" | ||
}, | ||
"files": [ | ||
"lib/**/!(*.test.*)" | ||
], | ||
"beachball": { | ||
"disallowedChangeTypes": [ | ||
"major" | ||
] | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30599
303