Open jvanasco opened 9 years ago
I still would say "why does supervisor core not have this"? 😉
If you set numprocs=0
will it effectively disable a process?
If you set
numprocs=0
will it effectively disable a process?
This actually works. When set to 0
, a supervisorctl start MYSERVICE
just returns MYSERVICE: ERROR (no such process)
I'd like to suggest a new feature: disable/enable a program.
disabled
flag on the disk. "disabled" processes will not be considered for "all" commands or on restart.disabled
flag on the disk.Rationale:
I often have to "disable" a process during maintenance, for fear that the system could restart and supervisord would restart the process. In order to do this, I have to essentially unregister the service by editing the supervisord config files. Even if using symlinks in a directory, this is awkward and tedious -- and I lose the program's status from within supervisor. Trying to find out if something is "disabled" is a chore, because I have to match a list of available configurations with active ones.
I think a better solution would be to simply mark the status as "disabled" and persist that to disk. The program would still be registered to supervisord and ready to
enable
at any time. The supervisorctl app andstatus
command would clearly report that the configuration is "disabled".I looked through the source and this seems relatively easy to do -- except for persisting the data to disk. I can't figure out a good place to store this.
If the maintainers think this is an acceptable idea and can suggest a place/mechanism for storing data, I think I can fork and PR.