-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worker.exit
should set process.exitCode
instead of calling process.exit
to allow cleanup
#429
Comments
Ahh, I was not aware of that. Who knows, this may explain some of the issues regarding exiting that we've seen in the past. For context: |
Anyone able to work this out in a PR? |
Just as a little context, I encountered this library when working with This is what I came up with for the mean time to reliably(?) run cleanup tasks from within a worker: process.prependListener('message', async (message) => {
if ('__workerpool-terminate__' === message) {
// ...
}
}); I might be able to get a PR on this soonish, but I would definitely want to familiarize myself a little more with the code than the quick spelunk that led me to bring this issue to your attention. Thanks for the response! |
Thanks for the clarification Ruben! Help working this out in a solution would be very welcome. |
any news on this issue? Thanks a lot! |
No news. Help would be welcome. |
see pr #483 , for me it fixes my issue of not properly finishing code before terminating |
No description provided.
The text was updated successfully, but these errors were encountered: