Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gunicorn run tornado app failed #2633

Merged
merged 1 commit into from
May 7, 2023
Merged

Conversation

duanhongyi
Copy link
Contributor

@alviezhang
Copy link
Contributor

This tornado worker is intent to support tornado web framework, I don't know if it is appropriate to support Django within this module.

And there are no tests in tests/workers directory too, we might have another case in order to fix django problem and eventually breaks tornado.

@duanhongyi
Copy link
Contributor Author

This tornado worker is intent to support tornado web framework, I don't know if it is appropriate to support Django within this module.

And there are no tests in tests/workers directory too, we might have another case in order to fix django problem and eventually breaks tornado.

If the gtornado module is only for the tornado web, not for the general WSGI program, I don't think it is necessary to exist in gunicorn.

@benoitc
Copy link
Owner

benoitc commented Aug 31, 2021

Changes looks good. Do you have any log reproducing the issue?

@duanhongyi
Copy link
Contributor Author

Because the application of the tornado web framework does not meet the WSGI specification. And tornado server can run it directly. So we don't need to wrap tornado web application with WSGIContainer.

The error is as follows:

ERROR:tornado.application:Uncaught exception
Traceback (most recent call last):
  File "/root/tmp/tornado/lib/python3.8/site-packages/tornado/http1connection.py", line 273, in _read_message
    delegate.finish()
  File "/root/tmp/tornado/lib/python3.8/site-packages/tornado/httpserver.py", line 280, in finish
    self.request_callback(self.request)
  File "/root/tmp/tornado/lib/python3.8/site-packages/tornado/wsgi.py", line 113, in __call__
    app_response = self.wsgi_application(
TypeError: __call__() takes 2 positional arguments but 3 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants