From b98205f896ff4fd0d8f6bb78cdb9cfb778aba9f7 Mon Sep 17 00:00:00 2001 From: Mark Adams Date: Tue, 25 Oct 2016 08:29:05 -0500 Subject: [PATCH] Update documentation to indicate inotify requirement for reloader --- docs/source/settings.rst | 13 +++++++++++-- gunicorn/config.py | 6 +++++- 2 files changed, 16 insertions(+), 3 deletions(-) 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. '''