-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[BUG] Make auth requests in async context async. #3477
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
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
f0f6a06
to
add24a8
Compare
The auth methods were both sync, which led to latency on the async thread pool. Fix that.
add24a8
to
eb39b0d
Compare
For posteriority sake. The real issue is not in the thread-pool but rather with the fact that asyc FastAPI executes on the main thread so any synchronous calls inside any of the API funcs will cause the main thread to block processing while the sync call returns, which is the reason we have That said it might be simpler to just follow the same pattern for the funcs that don't use |
@tazarov Thank you. A thread of one, that's separate from the other threads is, also, a pool, so I was sloppy in my message. |
The auth methods were both sync, which led to latency on the async
thread pool. Fix that.