You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Tom Hacohen 5b8f667e55 Cleanup django db connections before every request and every dependency.
This is instead of the commit we reverted in the previous commit.
The problem is that django keeps the connection per thread and it relies
on django itself to clean them up before/after connections.
We can't do this, because django is unaware of fastapi, so we have to
manage this ourselves.

The easiest way is to call it at the beginning of evenry route and every dep.
We need to do it for each because unfortunately fastapi may send them to
different worker threads.
4 years ago
..
routers Remove unused variable. 4 years ago
sendfile Reformat files using black. 4 years ago
__init__.py first commit 4 years ago
db_hack.py Cleanup django db connections before every request and every dependency. 4 years ago
dependencies.py Fix many type errors. 4 years ago
exceptions.py Cleanup validation errors. 4 years ago
main.py Revert "Add a django middleware to cleanup db connections." 4 years ago
msgpack.py Cleanup django db connections before every request and every dependency. 4 years ago
stoken_handler.py Remove usages of EtebaseValidationError. 4 years ago
utils.py Improve typing information. 4 years ago