From 40d22ae38d577a6d364730ae8fba669693e87706 Mon Sep 17 00:00:00 2001 From: John Whitlock Date: Mon, 19 Aug 2019 19:27:59 -0500 Subject: [PATCH] Add setproctitle to extras_require (#2094) This allows you to specify that you want setproctitle installed so that gunicorn can set meaningful process names at install time or in a requirements file. --- docs/source/custom.rst | 3 ++- docs/source/install.rst | 22 ++++++++++++++++++++++ setup.py | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/source/custom.rst b/docs/source/custom.rst index 0b8c366c..0fb39250 100644 --- a/docs/source/custom.rst +++ b/docs/source/custom.rst @@ -13,7 +13,8 @@ Here is a small example where we create a very small WSGI app and load it with a custom Application: .. literalinclude:: ../../examples/standalone_app.py - :lines: 11-60 + :start-after: # See the NOTICE for more information + :lines: 2- Direct Usage of Existing WSGI Apps ---------------------------------- diff --git a/docs/source/install.rst b/docs/source/install.rst index 3002a611..d6d146d2 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -52,6 +52,28 @@ want to consider one of the alternate worker types. installed, this is the most likely reason. +Extra Packages +============== +Some Gunicorn options require additional packages. You can use the ``[extra]`` +syntax to install these at the same time as Gunicorn. + +Most extra packages are needed for alternate worker types. See the +`design docs`_ for more information on when you'll want to consider an +alternate worker type. + +* ``gunicorn[eventlet]`` - Eventlet-based greenlets workers +* ``gunicorn[gevent]`` - Gevent-based greenlets workers +* ``gunicorn[gthread]`` - Threaded workers +* ``gunicorn[tornado]`` - Tornado-based workers, not recommended + +If you are running more than one instance of Gunicorn, the :ref:`proc-name` +setting will help distinguish between them in tools like ``ps`` and ``top``. + +* ``gunicorn[setproctitle]`` - Enables setting the process name + +Multiple extras can be combined, like +``pip install gunicorn[gevent,setproctitle]``. + Debian GNU/Linux ================ diff --git a/setup.py b/setup.py index ee898d88..31d173f6 100644 --- a/setup.py +++ b/setup.py @@ -78,6 +78,7 @@ extras_require = { 'eventlet': ['eventlet>=0.9.7'], 'tornado': ['tornado>=0.2'], 'gthread': [], + 'setproctitle': ['setproctitle'], } setup(