mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add support for gevent on python3
This commit is contained in:
parent
d478968d59
commit
66a0fdfd4f
@ -70,8 +70,12 @@ class GeventWorker(AsyncWorker):
|
|||||||
# patch sockets
|
# patch sockets
|
||||||
sockets = []
|
sockets = []
|
||||||
for s in self.sockets:
|
for s in self.sockets:
|
||||||
sockets.append(socket(s.FAMILY, _socket.SOCK_STREAM,
|
if sys.version_info[0] == 3:
|
||||||
_sock=s))
|
sockets.append(socket(s.FAMILY, _socket.SOCK_STREAM,
|
||||||
|
fileno=s.sock.fileno()))
|
||||||
|
else:
|
||||||
|
sockets.append(socket(s.FAMILY, _socket.SOCK_STREAM,
|
||||||
|
_sock=s))
|
||||||
self.sockets = sockets
|
self.sockets = sockets
|
||||||
|
|
||||||
def notify(self):
|
def notify(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user