consider the following configuration
[program:instance1]
command = bin/instance1 console
process_name = instance1
directory = /home/zope/bin
priority = 20
redirect_stderr = true
user = zope
[program:instance2]
command = bin/instance2 console
process_name = instance2
directory = /home/zope/bin
priority = 21
redirect_stderr = true
user = zope
autostart = false
autorestart = false
running supervisord will start instance1 and won't start instance2
when running supervisorctl restart all instance2 will be started.
from my point of view, it would make sense to only start programs having autostart=true when running supervisorctl restart all
maybe it would be even more consistent, if restart all would only stop and start programs that are currently running.
# starts instance1, but not instance2
supervisorctl stop instance1
# instance1 stopped, instance2 never started
supervisorctl restart all
# neither instance1 or instance2 restarted since they have not been running
supervisorctl stop all
# would stop all running programs
supervisorctl start all
# starts instance1 and instance2
i know this would break with the current behaviour. however - at least to me - this sounds much more sane.
maybe there is a secret command that does what i described above?
I could see the benefit of adding a supervisorctl restart running where running is a special keyword like all is but that resolves to a process list differently. I don't think changing the semantics of all is a good idea though, from a BC perspective.
Most helpful comment
I could see the benefit of adding a
supervisorctl restart runningwhere running is a special keyword like all is but that resolves to a process list differently. I don't think changing the semantics of all is a good idea though, from a BC perspective.