Skip to content

Instantly share code, notes, and snippets.

@cougarwww
Created December 15, 2012 17:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cougarwww/4297671 to your computer and use it in GitHub Desktop.
Save cougarwww/4297671 to your computer and use it in GitHub Desktop.
python: django uwsgi autoreload
import uwsgi
from uwsgidecorators import timer
from django.utils import autoreload
@timer(3)
def change_code_gracefull_reload(sig):
if autoreload.code_changed():
uwsgi.reload()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment