-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Labels
Description
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 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.
rahul26goyal and fcollonvalrahul26goyal