From 8feda487137852cc2c35088b0c722c7e634e3725 Mon Sep 17 00:00:00 2001 From: unbit Date: Sun, 2 Feb 2014 04:43:45 +0100 Subject: [PATCH] Update Snippets.rst --- Snippets.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Snippets.rst b/Snippets.rst index 40e91d78..c997c3e6 100644 --- a/Snippets.rst +++ b/Snippets.rst @@ -53,3 +53,24 @@ and this for /admin route-label = https route-if-not = equal:${HTTPS};on redirect-permanent:https://${HTTP_HOST}${REQUEST_URI} + + +Python Auto-reloading (DEVELOPMENT-ONLY !!!) +-------------------------------------------- + +In production you can monitor file/directory changes for triggering reloads (touch-reload, fs-reload...). + +During development having a monitor for all of the loaded/used python modules can be handy. But please use it only during development. + +The check is done by a thread that scans the modules list with the specified frequency: + +.. code-block:: ini + + [uwsgi] + ... + py-autoreload = 2 + +will check for python modules changes every 2 seconds and eventually restart the instance. + +Hey, use it only in development... +