Commit Graph

9 Commits

Author SHA1 Message Date
Tom Hacohen
2e21fe4994 Django db cleanup: explicitly add it to dependencies.
We can't really add it manually, because some of the deps are auto included as
parameters. These were not being decorated which in turn meeant issues.
2020-12-31 10:03:16 +02:00
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.
2020-12-30 17:16:58 +02:00
Tom Hacohen
62eb46ec4e msgpack route: use the encode/decode functions from the utils module. 2020-12-29 15:44:52 +02:00
Tom Hacohen
794b5f3983 Fix many type errors. 2020-12-29 13:32:19 +02:00
Tom Hacohen
80d69a5663 Fix collection list and how we return API responses. 2020-12-28 09:31:30 +02:00
Tom Hacohen
15988235f2 Exclude unset fields so fix removedMemberships return value. 2020-12-28 08:42:48 +02:00
Tom Hacohen
7f90edc511 MsgPack: handle no content. 2020-12-27 21:01:14 +02:00
Tal Leibman
25cb4fec0c msgpack.py: allow pydantic BaseModel in content 2020-12-27 20:32:09 +02:00
Tal Leibman
c1534f6587 first commit 2020-12-27 20:32:09 +02:00