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
It's very unhealthy for the database connection pools to always establish a new connection on each run. Also it's pretty bad to have a database connection always running (since there is maximum limit).
Hence, I would like to have a feature in the interval-py project to have a shared context for the actions, that you can access through the io object.
Imagine something like this (API borrowed from FastAPI):
@interval.on_event("startup")asyncdefstartup_event(io: IO):
""" Connect to the db. """io.state['pool'] =awaitcreate_pool(...)
Activity