Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reload django wsgi scripts without root

I have an install of django on apache using embedded wsgi. I DON'T have root on the machine.

How can I tell apache to reload the python instance when I deploy new source code?

I tried removing all the .pyc files and it still is running the old code.

like image 969
Paul Tarjan Avatar asked Jul 01 '09 19:07

Paul Tarjan


1 Answers

If you are running mod_wsgi in daemon mode with apache, you may not have to restart apache to get it to reload.

I just touch my wsgi file (unix: touch updates the 'saved date' of a file) and apache reloads it on next access/web-hit.

See http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

... as long as you can alter the timestamp on the WSGI script.

like image 129
joej Avatar answered Oct 07 '22 17:10

joej