I'd like to see if a process should be restarted when displaying the status.
It's easy to forget to reread the configuration file after modifying it. In such case, the user try to restart it and does not understand why the changes are not used.
Adding such info would break the backward compatibility if scripts parse the output.
To address this new problem, a configuration could be added to set the output of status in /etc/supervisor/supervisord.conf file. I think about two ways to implement it:
a boolean (called like changedstatus) to insert/ignore this data. By default, it must be disabled (for backward compatibility).
a list (called like statusline) to set up data displayed and their order. For example, with name,pid,status, a line will be like:
demo pid 16371, uptime 0:02:43 RUNNING
By default, it would be equivalent to statusline=name,status,pid (for backward compatibility).
IMO, Solution 2 is better because it's more versatile and allows to add new data in the future if needed.
Another way would be to add a new command to do that but the general usage of supervisorctl will be less clear so I think it's solution 2 is better than this one too.
What do you think about:
the idea to add the changed data in status command?
I'd like to see if a process should be restarted when displaying the
status
. It's easy to forget toreread
the configuration file after modifying it. In such case, the user try torestart
it and does not understand why the changes are not used.Currently, the output is:
It could be something like:
Adding such info would break the backward compatibility if scripts parse the output. To address this new problem, a configuration could be added to set the output of
status
in/etc/supervisor/supervisord.conf
file. I think about two ways to implement it:changedstatus
) to insert/ignore this data. By default, it must be disabled (for backward compatibility).statusline
) to set up data displayed and their order. For example, withname,pid,status
, a line will be like:By default, it would be equivalent to
statusline=name,status,pid
(for backward compatibility).IMO, Solution 2 is better because it's more versatile and allows to add new data in the future if needed.
Another way would be to add a new command to do that but the general usage of
supervisorctl
will be less clear so I think it's solution 2 is better than this one too.What do you think about:
changed
data instatus
command?I'm interested to make the PRs to implement it.