pvolok / mprocs

Run multiple commands in parallel
MIT License
1.48k stars 49 forks source link

[Feature] Separate process "id" and display-name in config #135

Open legobeat opened 3 months ago

legobeat commented 3 months ago

The process name is used both as key in the config yaml and as display-name in sidebar.

Would make scripting a lot smoother if this could be separated by introducing a new property for display name.

procs:
  foo1:
    label: 'foo [1]'
    shell: 'run-job foo'
  foo2:
    label: 'foo [2]'
    shell: 'run-job foo'
  # still displayed as "bar"
  bar:
    shell: 'run-job foo'

If neither backwards-compat or the overhead of overloaded config types are major concerns, it would further simplify things to make it a list rather than a dict:

procs:
  - label: 'foo [1]'
    shell: 'run-job foo'
  - label: 'foo [2]'
    shell: 'run-job foo'

(There are pros/cons to having the "unique ID" aspect of each job having an ID/name, still - not hard to imagine potential future functionality making use of it)

pvolok commented 3 months ago

This is definitely a needed feature. In fact I even went to check if I implemented the "title" field, because I thought about it in the past. Turns out it's not implemented yet.