uwsgi文件每次启动都要kill进程,这样非常麻烦,理想的情况是须要改动文件就自己主动生效,经查阅资料。发现uwsgi是自带该功能的,该功能的配置节例如以下
<uwsgi> <pythonpath>/home/*****/myproject/server/app</pythonpath> <touch-reload>/home/*******/myproject/server/app/</touch-reload>#须要热启动的配置路径,该路径下的文件被改动后,uwsgi会自己主动重新启动从而实现热启动 <module>main</module> <callable>app</callable> <socket>0.0.0.0:10080</socket> <listen>400</listen> <buffer-size>524288</buffer-size> <master/> <processes>6</processes> <memory-report/> </uwsgi>