How does set_user work with concurrency with FastAPI #1762
Unanswered
Exagone313
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Is
set_user
concurrency-safe? FastAPI uses an event loop and (if I understand correctly) the processing of a response can be stopped and resumed while another route is handled in the middle. This means that, when the first route processing is resumed, the currently set user may not be the one set previously.Or, does sentry-sdk deal with this and saves the user per-request somehow?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions