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
What do you think about the idea of adding a startup event? To make an example, I may wanna initialize a connection pool to my database at startup, and re-use connections across requests. I cannot do that though in Python, since the asyncio loop running will not be the same as the one used to process the requests... a possible solution is to register a Pyo3 function in the Rust server during initialization in Py, and call it before you start the webserver
What do you think about the idea of adding a startup event? To make an example, I may wanna initialize a connection pool to my database at startup, and re-use connections across requests. I cannot do that though in Python, since the asyncio loop running will not be the same as the one used to process the requests... a possible solution is to register a Pyo3 function in the Rust server during initialization in Py, and call it before you start the webserver
Some examples of how it is done in the py servers: https://www.starlette.io/events/
Originally posted by @klaa97 here.
The text was updated successfully, but these errors were encountered: