From 7629575d8d38f79850613bb1ec3931f50117c27b Mon Sep 17 00:00:00 2001 From: benoitc Date: Sat, 22 May 2010 21:18:40 +0200 Subject: [PATCH] handle preload in django command --- gunicorn/management/commands/run_gunicorn.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gunicorn/management/commands/run_gunicorn.py b/gunicorn/management/commands/run_gunicorn.py index e1b342f4..b3a2dac7 100644 --- a/gunicorn/management/commands/run_gunicorn.py +++ b/gunicorn/management/commands/run_gunicorn.py @@ -39,6 +39,8 @@ class Command(BaseCommand): help="Change worker group"), make_option('-n', '--name', dest='proc_name', help="Process name"), + make_option('--preload', dest='preload_app', action='store_true', default=False, + help="Load application code before the worker processes are forked.") ) help = "Starts a fully-functional Web server using gunicorn." args = '[optional port number, or ipaddr:port or unix:/path/to/sockfile]'