mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Register gaiohttp worker for Python 3.3+ only.
This commit is contained in:
parent
fbb2d01d13
commit
3665e5bb5c
@ -3,13 +3,18 @@
|
|||||||
# This file is part of gunicorn released under the MIT license.
|
# This file is part of gunicorn released under the MIT license.
|
||||||
# See the NOTICE for more information.
|
# See the NOTICE for more information.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
# supported gunicorn workers.
|
# supported gunicorn workers.
|
||||||
SUPPORTED_WORKERS={
|
SUPPORTED_WORKERS={
|
||||||
"sync": "gunicorn.workers.sync.SyncWorker",
|
"sync": "gunicorn.workers.sync.SyncWorker",
|
||||||
"eventlet": "gunicorn.workers.geventlet.EventletWorker",
|
"eventlet": "gunicorn.workers.geventlet.EventletWorker",
|
||||||
"gaiohttp": "gunicorn.workers.gaiohttp.AiohttpWorker",
|
|
||||||
"gevent": "gunicorn.workers.ggevent.GeventWorker",
|
"gevent": "gunicorn.workers.ggevent.GeventWorker",
|
||||||
"gevent_wsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker",
|
"gevent_wsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker",
|
||||||
"gevent_pywsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker",
|
"gevent_pywsgi": "gunicorn.workers.ggevent.GeventPyWSGIWorker",
|
||||||
"tornado": "gunicorn.workers.gtornado.TornadoWorker"}
|
"tornado": "gunicorn.workers.gtornado.TornadoWorker"}
|
||||||
|
|
||||||
|
|
||||||
|
if sys.version_info >= (3, 3):
|
||||||
|
# gaiohttp worker can be used with Python 3.3+ only.
|
||||||
|
SUPPORTED_WORKERS["gaiohttp"] = "gunicorn.workers.gaiohttp.AiohttpWorker"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user