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

Add add-proc-name command #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GaetanLepage
Copy link

@GaetanLepage GaetanLepage commented Sep 4, 2024

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 existing add-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 the AddProc event.
I wasn't sure how and where to factorize this snippet.

@GaetanLepage GaetanLepage changed the title Add add-proc-name command Add add-proc-name command Sep 4, 2024
This allows to add a process and to give it a name directly
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

Successfully merging this pull request may close these issues.

1 participant