Skip to content
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

[Question] How to stop a currently-running work? #78

Open
ryanelian opened this issue Apr 27, 2018 · 1 comment
Open

[Question] How to stop a currently-running work? #78

ryanelian opened this issue Apr 27, 2018 · 1 comment

Comments

@ryanelian
Copy link

ryanelian commented Apr 27, 2018

workerFarm.end(farm) documentation says:

If you send your farm API to workerFarm.end() then it'll cleanly end your worker processes. Note though that it's a soft ending so it'll wait for child processes to finish what they are working on before asking them to die.

What if I need to hard-end an ongoing jobs, before queuing new ones?

Use case: the long-running (forever) ongoing jobs has gone bad because of top-level (parent process) config changes, so the parent needs to spin new long-running ongoing jobs, but only after killing the original, bad jobs first.

@ryanelian ryanelian reopened this Sep 21, 2019
@jdmarshall
Copy link

I believe we call stopChild() in a loop on CTRL-C in the parent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants