Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use uwsgi restart django

I have a wsgi.ini file in my project, and I use uwsgi wsgi.ini to run my project.But when I change the django code,I want to restart the project instead kill uwsgi then reload it. The uwsgi official document provide the following methods: # using kill to send the signal kill -HUP `cat /tmp/project-master.pid` # or the convenience option --reload uwsgi --reload /tmp/project-master.pid # or if uwsgi was started with touch-reload=/tmp/somefile touch /tmp/somefile But I don't have a project-master.pid file in /tmp catalog in my system(centOS).

my question:

  1. how to use uwsgi restart django instead of kill it then start it?
  2. if use uwsgi official document provided method,how to create a .pid file and what content should in this file?
like image 915
cherry Avatar asked Oct 28 '25 03:10

cherry


1 Answers

I found simplier answer in my opinion, you can just kill your uwsgi process and then spawn it again:

killall uwsgi

And then just run your uwsgi command again.

like image 85
Dolidod Teethtard Avatar answered Oct 30 '25 17:10

Dolidod Teethtard