You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on server extension that needs to trigger an asyncio.Task as soon as the Tornado Web Server starts. (If I try to start it any sooner, we'll get the infamous RuntimeError: no running event loop). Currently, there is no easy way to do this using the provided Server Extension API.
Proposed Solution
I'd like to propose that we add a async def post_start(...) method/API to the ExtensionApp that can be used by authors to trigger tasks after the webserver (and presumably the main event loop) is started. This works nicely with the async def stop() API that's already in-place to cleanly stop async tasks in server extensions.
The text was updated successfully, but these errors were encountered:
Problem
I'm working on server extension that needs to trigger an
asyncio.Task
as soon as the Tornado Web Server starts. (If I try to start it any sooner, we'll get the infamousRuntimeError: no running event loop
). Currently, there is no easy way to do this using the provided Server Extension API.Proposed Solution
I'd like to propose that we add a
async def post_start(...)
method/API to the ExtensionApp that can be used by authors to trigger tasks after the webserver (and presumably the main event loop) is started. This works nicely with theasync def stop()
API that's already in-place to cleanly stop async tasks in server extensions.The text was updated successfully, but these errors were encountered: