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
When the AsyncIOMotorClient is initialized in init_app, asyncio.get_event_loop is called, and a reference to the event loop is stored. This can cause problems when a loop other than the default is used (e.g. uvloop or the loop created by Henson's CLI's reloader).
To address this, the creation of the client should be deferred. The easiest approach here is to use the app.startup hook to create the client when the application is starting rather than during the extension's initialization. (Are there other / better options here, as well?)
The text was updated successfully, but these errors were encountered:
When the
AsyncIOMotorClient
is initialized ininit_app
,asyncio.get_event_loop
is called, and a reference to the event loop is stored. This can cause problems when a loop other than the default is used (e.g.uvloop
or the loop created by Henson's CLI's reloader).To address this, the creation of the client should be deferred. The easiest approach here is to use the
app.startup
hook to create the client when the application is starting rather than during the extension's initialization. (Are there other / better options here, as well?)The text was updated successfully, but these errors were encountered: