Hi!
I’m writing some code (tests, celery, and other) and I’d like to wrap my code in a context.
Generally, I would go with a app_context, to have the application available inside that code, but in my case, I initiate the database session in the request context, not the app context (for the simple reason that I handle the commit/rollback actions once the request have finished, depending on the response (error or not)).
Because of that, the database is not availabe if I run my code inside an app_context, but it is when I run it inside a request_context.
Is this something possible on Sanic ?
Thank you