fix: gunicorn run tornado app failed

This commit is contained in:
duanhongyi 2021-08-25 13:54:50 +08:00 committed by duanhongyi
parent 1299ea9e96
commit df82cac7d9

View File

@ -110,7 +110,8 @@ class TornadoWorker(Worker):
if not isinstance(app, tornado.web.Application) or \
isinstance(app, tornado.wsgi.WSGIApplication):
app = WSGIContainer(app)
elif not isinstance(app, WSGIContainer):
elif not isinstance(app, WSGIContainer) and \
not isinstance(app, tornado.web.Application):
app = WSGIContainer(app)
# Monkey-patching HTTPConnection.finish to count the