This one is to fix my own PR #125, the requirement files contained the following sentence:
"To update, run: pip-compile --output-file=requirements.txt requirements.in/base.txt"
But that was misleading, after reading pip-tools documentation I found that
"If pip-compile finds an existing requirements.txt file that fulfils the dependencies then no changes will be made, even if updates are available."
That was my mistake, generated the files again and made new builds using python 3.10 that worked as expected. Once again sorry for the mistake!
This strips the port from the client requests, comparing only the hostnames or IP addresses, and should alleviate nonstandard port and initial testing issues. Tested on Linux, Mac, and Android clients. Closes#105.
Code is from this comment:
https://github.com/etesync/server/issues/66#issuecomment-731215345
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.
This ended up being useless because of the way startlette and fastapi do
thread pools. The middleware is called in one thread, the path in
another, and the dependency in yet another.
This reverts commit 473448246f.
The code uses the django ORM which is sync, and fastapi handles sync paths
just fine. So having all of this extra code for handling async was unnecessary.
* Changed link to wiki
* Removed unneeded links (as uWSGI won't be supported)
* Added --host flag to uvicorn command, as the server is only accessible from the host machine otherwise (and not from another in the local network)