mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix up ugly attribute use in ggevent
This commit is contained in:
parent
f7dd412bc3
commit
612a895b15
@ -39,6 +39,9 @@ BASE_WSGI_ENV = {
|
|||||||
|
|
||||||
class GeventWorker(AsyncWorker):
|
class GeventWorker(AsyncWorker):
|
||||||
|
|
||||||
|
server_class = None
|
||||||
|
wsgi_handler = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup(cls):
|
def setup(cls):
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
@ -53,7 +56,7 @@ class GeventWorker(AsyncWorker):
|
|||||||
self.socket.setblocking(1)
|
self.socket.setblocking(1)
|
||||||
|
|
||||||
pool = Pool(self.worker_connections)
|
pool = Pool(self.worker_connections)
|
||||||
if hasattr(self, 'server_class'):
|
if self.server_class is not None
|
||||||
server = self.server_class(
|
server = self.server_class(
|
||||||
self.socket, application=self.wsgi, spawn=pool, log=self.log,
|
self.socket, application=self.wsgi, spawn=pool, log=self.log,
|
||||||
handler_class=self.wsgi_handler)
|
handler_class=self.wsgi_handler)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user