Skip to content

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

@ryanelian

Description

@ryanelian

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions