From 133a85e4ee2125ee0bbccfaf7451a3b85e720f3c Mon Sep 17 00:00:00 2001 From: Keegan Carruthers-Smith Date: Thu, 26 May 2011 22:20:44 +0200 Subject: [PATCH] Updated docs to reflect the proper alternative syntax for specifying a worker class. --- doc/htdocs/configure.html | 13 ++++++++----- examples/example_config.py | 2 +- gunicorn/config.py | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/htdocs/configure.html b/doc/htdocs/configure.html index d0f57dcc..498220eb 100644 --- a/doc/htdocs/configure.html +++ b/doc/htdocs/configure.html @@ -185,10 +185,13 @@ when you might want to choose one of the other worker classes.

  • gevent - Requires gevent >= 0.12.2 (?)
  • 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

    +

    +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: +gunicorn.workers.ggevent.GeventWorker. +Alternatively the syntax can also load the gevent class with +egg:gunicorn#gevent

    worker_connections

    @@ -581,4 +584,4 @@ the just-exited Worker.

    - \ No newline at end of file + diff --git a/examples/example_config.py b/examples/example_config.py index 86af76de..a0009004 100644 --- a/examples/example_config.py +++ b/examples/example_config.py @@ -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: # diff --git a/gunicorn/config.py b/gunicorn/config.py index 268d8149..d1f4a73e 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -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):