Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastAPI is async, so this app must use Motor, not PyMongo #5

Open
judy2k opened this issue Aug 10, 2023 · 0 comments
Open

FastAPI is async, so this app must use Motor, not PyMongo #5

judy2k opened this issue Aug 10, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@judy2k
Copy link

judy2k commented Aug 10, 2023

PyMongo is blocking, and is thus incompatible with FastAPI, which is asynchronous. Any long-running queries running in a single endpoint will block every other operation until it is complete.

A (relatively straightforward) switch to Motor should fix this issue.

@judy2k judy2k added the bug Something isn't working label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant