update README. while I'm here add short option for workers

This commit is contained in:
Benoit Chesneau 2010-02-15 15:57:58 +01:00
parent ec7614f50c
commit 6e3fec40fc
3 changed files with 20 additions and 14 deletions

View File

@ -27,10 +27,15 @@ Usage
Options: Options:
-b BIND, --bind=BIND Adress to listen on. Ex. 127.0.0.1:8000 or -b BIND, --bind=BIND Adress to listen on. Ex. 127.0.0.1:8000 or
unix:/tmp/gunicorn.sock unix:/tmp/gunicorn.sock
--workers=WORKERS Number of workers to spawn. [1] -w, --workers=WORKERS Number of workers to spawn. [none]
-p PIDFILE, --pid=PIDFILE -p PIDFILE, --pid=PIDFILE
set the background PID FILE set the background PID FILE
-D, --daemon Run daemonized in the background. -D, --daemon Run daemonized in the background.
-m UMASK, --umask=UMASK
Define umask of daemon process
-u USER, --user=USER Change worker user
-g GROUP, --group=GROUP
Change worker group
--log-level=LOGLEVEL Log level below which to silence messages. [info] --log-level=LOGLEVEL Log level below which to silence messages. [info]
--log-file=LOGFILE Log to a file. - is stdout. [-] --log-file=LOGFILE Log to a file. - is stdout. [-]
-d, --debug Debug mode. only 1 worker. -d, --debug Debug mode. only 1 worker.
@ -38,6 +43,7 @@ Usage
-h, --help show this help message and exit -h, --help show this help message and exit
Example with test app:: Example with test app::
$ cd examples $ cd examples

View File

@ -30,7 +30,7 @@ def options():
return [ return [
op.make_option('-b', '--bind', dest='bind', op.make_option('-b', '--bind', dest='bind',
help='Adress to listen on. Ex. 127.0.0.1:8000 or unix:/tmp/gunicorn.sock'), help='Adress to listen on. Ex. 127.0.0.1:8000 or unix:/tmp/gunicorn.sock'),
op.make_option('--workers', dest='workers', type='int', op.make_option('-w', '--workers', dest='workers', type='int',
help='Number of workers to spawn. [%default]'), help='Number of workers to spawn. [%default]'),
op.make_option('-p','--pid', dest='pidfile', op.make_option('-p','--pid', dest='pidfile',
help='set the background PID FILE'), help='set the background PID FILE'),

View File

@ -23,7 +23,7 @@ class Command(BaseCommand):
option_list = BaseCommand.option_list + ( option_list = BaseCommand.option_list + (
make_option('--adminmedia', dest='admin_media_path', default='', make_option('--adminmedia', dest='admin_media_path', default='',
help='Specifies the directory from which to serve admin media.'), help='Specifies the directory from which to serve admin media.'),
make_option('--workers', dest='workers', default='1', make_option('-w', '--workers', dest='workers', default='1',
help='Specifies the number of worker processes to use.'), help='Specifies the number of worker processes to use.'),
make_option('--pid', dest='pidfile', default='', make_option('--pid', dest='pidfile', default='',
help='set the background PID file'), help='set the background PID file'),