2

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?

Daryl
  • 1,469
  • 5
  • 18
  • 30

2 Answers2

9

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.

mbaechtold
  • 440
  • 4
  • 14
1

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.

tehfink
  • 447
  • 8
  • 7