Merge pull request #2633 from duanhongyi/patch-1

fix:  gunicorn run tornado app failed
This commit is contained in:
Benoit Chesneau 2023-05-07 19:47:32 +02:00 committed by GitHub
commit 8c1747b224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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