Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows to add a process and to give it a name directly.
Example:
mprocs --server 127.0.0.1:4050 --ctl '{c: add-proc-name, name: "main-server", cmd: "./run-server.sh --port 1234"}'
Warning, my rust skills are very limited and this is no more than an honest and naive attempt at implementing this feature.
Alternatively, we could simply add an optional
name
field to the existingadd-proc
command.As I haven't found any example of optional fields in the existing commands, I have went with adding a brand new command.
However, I would feel like this would be a cleaner solution.
Also, this implementation adds duplicated code in
app.rs
which is shared with theAddProc
event.I wasn't sure how and where to factorize this snippet.