bug: When importing a taxonomy, the /projects
API call stays pending
during the /import
background task running
#401
Labels
🐛 bug
Something isn't working
I believe this is due to
FastAPI
's (or even more likelyStarlette
's) implementation of an ASGI app: the background tasks are awaited before thebody
is completely sent (send({"type": "http.response.body", "body": b"", "more_body": False})
is awaited after the background tasks finish)Thus, the
/projects
call is considering to be HTTP pipelining and is responded after the/import
background tasks are finishedA temporary fix is to force the HTTP connection of
/import
to closeFurther work should be done to diagnose this issue and report it to
FastAPI
orStarlette
(with at least a small reproducible example of the issue and if possible a solution)The text was updated successfully, but these errors were encountered: