Updated docs to reflect the proper alternative syntax for specifying a worker class.

This commit is contained in:
Keegan Carruthers-Smith 2011-05-26 22:20:44 +02:00 committed by benoitc
parent 087647dc88
commit 133a85e4ee
3 changed files with 13 additions and 9 deletions

View File

@ -185,10 +185,13 @@ when you might want to choose one of the other worker classes.</p>
<li><tt class="docutils literal">gevent</tt> - Requires gevent &gt;= 0.12.2 (?)</li>
<li><tt class="docutils literal">tornado</tt> - Requires tornado &gt;= 0.2</li>
</ul>
<p>Optionally, you can provide your own worker by giving gunicorn a
MODULE:CLASS pair where CLASS is a subclass of
gunicorn.workers.base.Worker. This alternative syntax will load the
gevent class: <tt class="docutils literal">egg:gunicorn#gevent</tt></p>
<p>
Optionally, you can provide your own worker by giving gunicorn a python path
to a subclass of gunicorn.workers.base.Worker. This alternative syntax will
load the gevent class:
<tt class="docutils literal">gunicorn.workers.ggevent.GeventWorker</tt>.
Alternatively the syntax can also load the gevent class with
<tt class="docutils literal">egg:gunicorn#gevent</tt></p>
</div>
<div class="section" id="worker-connections">
<h4><a class="toc-backref" href="#contents">worker_connections</a></h4>
@ -581,4 +584,4 @@ the just-exited Worker.</p>
</div>
</div>
</body>
</html>
</html>

View File

@ -38,7 +38,7 @@ backlog = 2048
# of the other worker classes.
#
# An string referring to a 'gunicorn.workers' entry point
# or a MODULE:CLASS pair where CLASS is a subclass of
# or a python path to a subclass of
# gunicorn.workers.base.Worker. The default provided values
# are:
#

View File

@ -318,9 +318,10 @@ class WorkerClass(Setting):
* ``tornado`` - Requires tornado >= 0.2
Optionally, you can provide your own worker by giving gunicorn a
MODULE:CLASS pair where CLASS is a subclass of
gunicorn.workers.base.Worker. This alternative syntax will load the
gevent class: ``egg:gunicorn#gevent``
python path to a subclass of gunicorn.workers.base.Worker. This
alternative syntax will load the gevent class:
``gunicorn.workers.ggevent.GeventWorker``. Alternatively the syntax
can also load the gevent class with ``egg:gunicorn#gevent``
"""
class WorkerConnections(Setting):