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

Support tornado>=6.0 #1001

Closed
wallacbe opened this issue Apr 4, 2022 · 3 comments · Fixed by #1181
Closed

Support tornado>=6.0 #1001

wallacbe opened this issue Apr 4, 2022 · 3 comments · Fixed by #1181

Comments

@wallacbe
Copy link
Collaborator

wallacbe commented Apr 4, 2022

Support tornado>=6.0

This was referenced Oct 12, 2022
@dbhatman
Copy link
Collaborator

FYI #934 includes some failure example logs

@glados-verma
Copy link
Collaborator

When trying to run the dashboard_server with Python3.10, I see this error: AttributeError: module 'collections' has no attribute 'MutableMapping'. The current version of Tornado therefore caps us to using Python3.9 at the latest.

@matt-donahoe-skydio
Copy link

matt-donahoe-skydio commented Oct 22, 2022

I added explicit asyncio event loops in the run() method of any threading.Thread subclass, like WebGuiServer and StationWatcher.

asyncio.set_event_loop(asyncio.new_event_loop())

I also had to delay the call to self.server.add_sockets(sockets) until the event loop was set for the thread, otherwise tornado would grab a reference to the eventloop of the main thread and get blocked, never responding to requests.

Seems to work so far, but I'm very new to OpenHTF, so I doubt I caught everything. I'll post a PR in a few days if no one beats me to it.

Here's my diff
matt-donahoe-skydio@fadbee1

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 a pull request may close this issue.

4 participants