update doc

This commit is contained in:
benoitc 2010-04-22 19:20:33 +02:00
parent 090bb8fe29
commit be6035769c
5 changed files with 54 additions and 49 deletions

View File

@ -50,11 +50,11 @@ Usage
Config file. [none] Config file. [none]
-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
-k WORKERCLASS, --worker-class=WORKERCLASS
The type of request processing to use
[egg:gunicorn#main]
-w WORKERS, --workers=WORKERS -w WORKERS, --workers=WORKERS
Number of workers to spawn. [1] Number of workers to spawn. [1]
-a ARBITER, --arbiter=ARBITER
gunicorn arbiter entry point or module
[egg:gunicorn#main]
-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.

View File

@ -11,7 +11,6 @@ Example gunicorn.conf.py
:: ::
arbiter = "egg:gunicorn" # The arbiter to use for worker management
backlog = 2048 # The listen queue size for the server socket backlog = 2048 # The listen queue size for the server socket
bind = "127.0.0.1:8000" # Or "unix:/tmp/gunicorn.sock" bind = "127.0.0.1:8000" # Or "unix:/tmp/gunicorn.sock"
daemon = False # Whether work in the background daemon = False # Whether work in the background
@ -28,6 +27,7 @@ Example gunicorn.conf.py
spew=False # Display trace spew=False # Display trace
timeout=30 # Worker timeout timeout=30 # Worker timeout
tmp_upload_dir = None # Set path used to store temporary uploads tmp_upload_dir = None # Set path used to store temporary uploads
worker_class = "egg:gunicorn#sync" # The type of request processing to use
worker_connections=1000 # Maximum number of simultaneous connections worker_connections=1000 # Maximum number of simultaneous connections
after_fork=lambda server, worker: server.log.info( after_fork=lambda server, worker: server.log.info(
@ -43,17 +43,16 @@ Parameter Descriptions
after_fork(server, worker): after_fork(server, worker):
This is called by the worker after initialization. This is called by the worker after initialization.
arbiter: worker_class:
The arbiter manages the worker processes that actually serve clients. It Define the type of worker to use. A worker process all the requests send by
handles launching new workers and killing misbehaving workers among the arbiter.By default the worker_class is `egg:gunicorn#sync`. This worker
other things. By default the arbiter is `egg:gunicorn#main`. This arbiter
only supports fast request handling requiring a buffering HTTP proxy. only supports fast request handling requiring a buffering HTTP proxy.
If your application requires the ability to handle prolonged requests to If your application requires the ability to handle prolonged requests to
provide long polling, comet, or calling an external web service you'll provide long polling, comet, or calling an external web service you'll
need to use an async arbiter. Gunicorn has two async arbiters built in need to use an async worker. Gunicorn has three async workers built in
using `Eventlet`_ or `Gevent`_. You can also use the Evenlet arbiter with using `Tornado`_, `Eventlet`_ or `Gevent`_. You can also use the Evenlet
the `Twisted`_ helper. worker with the `Twisted`_ helper.
backlog: backlog:
The backlog parameter defines the maximum length for the queue of pending The backlog parameter defines the maximum length for the queue of pending
@ -121,5 +120,6 @@ tmp_upload_dir:
.. _Eventlet: http://eventlet.net .. _Eventlet: http://eventlet.net
.. _Gevent: http://gevent.org .. _Gevent: http://gevent.org
.. _Twisted: http://twistedmatrix.com .. _Twisted: http://twistedmatrix.com
.. _Tornado: http://www.tornadoweb.org/
.. _setproctitle: http://pypi.python.org/pypi/setproctitle .. _setproctitle: http://pypi.python.org/pypi/setproctitle

View File

@ -4,6 +4,13 @@ title: News
News News
==== ====
0.7.3 / 2004-04-22
------------------
- Refactored Worker management for better async support. Now use the -k option to set the type of request processing to use
- Added support for `Tornado <http://www.tornadoweb.org/>`_ .
0.7.2 / 2010-04-15 0.7.2 / 2010-04-15
------------------ ------------------

View File

@ -43,11 +43,11 @@ Full command line usage
Config file. [none] Config file. [none]
-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
-k WORKERCLASS, --worker-class=WORKERCLASS
The type of request processing to use
[egg:gunicorn#main]
-w WORKERS, --workers=WORKERS -w WORKERS, --workers=WORKERS
Number of workers to spawn. [1] Number of workers to spawn. [1]
-a ARBITER, --arbiter=ARBITER
gunicorn arbiter entry point or module
[egg:gunicorn#main]
-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.

View File

@ -65,8 +65,6 @@ class GEventWorker(AsyncWorker):
except greenlet.GreenletExit: except greenlet.GreenletExit:
return return
def cleanup(self, gt): def cleanup(self, gt):
try: try:
try: try: