我有一个包含以下10个流程的程序:
[program:myprogram]
command=webservlet port=60%(process_num)03d
priority=5
numprocs=10
process_name=%(program_name)s_%(process_num)02d
autostart=true
当我更改代码时,我需要重新启动所有进程:
supervisorctl restart myprogram:
我想知道是否有办法错开重启,这样他们就不会一次全部下线?
答案 0 :(得分:0)
感谢@NickSweeting,这就是我所做的:
restart-app.sh
:
supervisorctl restart myapp:myapp_00
sleep 1
supervisorctl restart myapp:myapp_01
sleep 1
supervisorctl restart myapp:myapp_02
sleep 1
supervisorctl restart myapp:myapp_03
sleep 1
supervisorctl restart myapp:myapp_04
sleep 1
supervisorctl restart myapp:myapp_05
sleep 1
supervisorctl restart myapp:myapp_06
sleep 1
supervisorctl restart myapp:myapp_07
sleep 1
supervisorctl restart myapp:myapp_08
sleep 1
supervisorctl restart myapp:myapp_09