diff --git a/docs/source/settings.rst b/docs/source/settings.rst index b39c0c4a..90bf9b74 100644 --- a/docs/source/settings.rst +++ b/docs/source/settings.rst @@ -255,8 +255,8 @@ Debugging reload ~~~~~~ -* ``--reload`` -* ``False`` +* ``--reload RELOADER_TYPE`` +* ``None`` Restart workers when code changes. @@ -267,6 +267,15 @@ The reloader is incompatible with application preloading. When using a paste configuration be sure that the server block does not import any application code or the reload will not work as designed. +When using this option, you can optionally specify whether you would +like to use file system polling or the kernel's inotify API to watch +for changes. Generally, inotify should be preferred if available +because it consumes less system resources. If no preference is given, +inotify will attempted with a fallback to FS polling. + +Note: In order to use the inotify reloader, you must have the 'inotify' +package installed. + spew ~~~~ diff --git a/gunicorn/config.py b/gunicorn/config.py index ff6c40ec..60e93bf7 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -823,6 +823,7 @@ class Reload(Setting): nargs = '?' const = 'default' default = None + meta = 'RELOADER_TYPE' desc = '''\ Restart workers when code changes. @@ -838,7 +839,10 @@ class Reload(Setting): like to use file system polling or the kernel's inotify API to watch for changes. Generally, inotify should be preferred if available because it consumes less system resources. If no preference is given, - inotify will attempted with a fallback to FS polling.' + inotify will attempted with a fallback to FS polling. + + Note: In order to use the inotify reloader, you must have the 'inotify' + package installed. '''