josdejong / workerpool

Offload tasks to a pool of workers on node.js and in the browser
Apache License 2.0
2.04k stars 148 forks source link

capture stdio during execution of a task #423

Closed cpendery closed 7 months ago

cpendery commented 8 months ago

Would it be possible to have an API exposed where after the completion of a task, I receive any stdout or stderr that occurred during the task? I don't want to use forkOpts.stdio with inherit since I need to suppress / refine the task's output. It would be great to expose child/thread's stdout/stderr since there isn't support in NodeJS to capture it within the worker.

josdejong commented 7 months ago

I guess forkOpts.stdio (for child processes) or workerOpts (for worker threads) is the only option.

josdejong commented 7 months ago

Published now in v9.1.0, see #425.