Question

I'm having some trouble with Cherokee + uWSGI picking up on code changes to .py files in my django app. Even using

find -name "*.pyc" -delete

...seems to have no effect.

Changes are noticed instantly, on refresh, when running the same code base under django runserver

How do I force restart and reliably see changes under Cherokee + uWSGI + Django?

Was it helpful?

Solution

The Django development server picks up on code changes, but this is not a feature you'd want in a production server. You need to restart your Python processes, monitored by uwsgi, in order to run your latest code. On FreeBSD with uwsgi from ports, you can do:

/usr/local/etc/rc.d/uwsgi restart

More info in the uwsgi manual.

OTHER TIPS

In your uwsgi.xml you could add <touch-reload>/path/to/file</touch-reload>.

When you run touch /path/to/file your changes should be loaded.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top