1
gevent의 pywsgi 서버를 통해 토네이도의 WSGIApplication을 실행하면 greenlets의 예외가 표시되지 않고 표준 오류/출력에 표시되지 않습니다. 나는 보았고, 보았고, 이것이 일어나고있는 이유를 발견 할 수 없었다.gevent + torornado 설정에서 Greenlet 예외가 표시되지 않음
여기에 약간의 테스트 애플 리케이션은 보여입니다 :
#!/usr/bin/env python
import gevent.monkey
gevent.monkey.patch_all()
import gevent.wsgi
import tornado.web
import tornado.wsgi
class MainHandler(tornado.web.RequestHandler):
def prepare(self):
# this next line will cause a NameError
a = i_dont_exist_here
class App(tornado.wsgi.WSGIApplication):
def __init__(self):
tornado.wsgi.WSGIApplication.__init__(self, [(r"/", MainHandler)])
if __name__ == '__main__':
gevent.wsgi.WSGIServer(('', 80), App()).serve_forever()