Brad T.
Brad T.

Reputation: 252

Restart Django production server (passenger wsgi)

I uploaded a modified views.py to the production server, but it's still using the old code. I also deleted the views.pyc and views.py to see if it'd clear it's old cached python code. That worked after a while of waiting the past few times, but I really want to know how to do things quickly. The site is hosted on dreamhost and is using passenger wsgi.

How do I quickly and manually restart it so that it'll use my new views.py code?

Upvotes: 2

Views: 3602

Answers (1)

dting
dting

Reputation: 39287

http://wiki.dreamhost.com/Django#Hints

If you modified your application and your changes do not seem to be reflected, you may need to notify Passenger about your change by creating or modifying ~/example.com/tmp/restart.txt:

touch /home/user/example.com/tmp/restart.txt

Passenger looks for this file and reloads the application when this file is modified.

Upvotes: 6

Related Questions