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

Get commands/processes list OR How to kill some concurrently process from outside #209

Closed
SARFEX opened this issue Dec 19, 2019 · 5 comments

Comments

@SARFEX
Copy link

SARFEX commented Dec 19, 2019

Subj

Actually, I want to restart a single process by "killing" it, from the same place, where I have initiated concurrently.
How can I do this?

@gustavohenke
Copy link
Member

Hi @SARFEX,
One such way is to grab the PID off of the output. It's not great, I know!

@gustavohenke
Copy link
Member

An idea I have is to expand the returned value of the programmatic API to be something like this:

const commands = concurrently(['echo foo', 'echo bar'], options);
commands.result // promise that resolves/rejects according to the success condition of the options
commands.pids // an array of PIDs

// could have more useful stuff

WDYT? This would be a major/breaking change then.

@aalimovs
Copy link

@gustavohenke what about expanding the input handling functionality and adding ability to restart a process? E.g. srv:restart 0:restart. There could be a conflict where you might actually want to pass restart as an input to the process, we could escape it with srv:!restart, and use it for any future commands too

@alexweininger
Copy link

This would be really useful for me. I'd be willing to help with this feature. We could potentially avoid a breaking change by adding a flag or a callback.

But if the breaking change is too large, is there another tool like concurrently that can expose the pids?

@gustavohenke
Copy link
Member

Happy new year! This is now out in v7.0.0.

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

No branches or pull requests

4 participants