Add Starlette BackgroundTask Warning to FastAPI Docs #14623
Unanswered
MarleTangible
asked this question in
Questions
Replies: 1 comment
-
|
I think this is a good idea. Adding a warning block should be enough. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Starlette documentation mentions an important point about how the background tasks are processed that would be really useful for users to know directly from FastAPI docs instead of going through all the Starlette docs to see this warning.
Tasks are executed in (FIFO) order and any exception thrown by a single task causes all the following tasks to fail as well. For example the sample code will only write a single line of code, and yes I updated the write mode to append.
Operating System
Windows
Operating System Details
No response
FastAPI Version
0.128.0
Pydantic Version
2.12.5
Python Version
Python 3.12.11
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions