Skip to content

Commit

Permalink
📝 Add warning about lifespan functions and backwards compatibility wi…
Browse files Browse the repository at this point in the history
…th events (#10734)

Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
  • Loading branch information
jacob-indigo and alejsdev committed Jan 12, 2024
1 parent dc70403 commit 7e0e16f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/en/docs/advanced/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ The `lifespan` parameter of the `FastAPI` app takes an **async context manager**
## Alternative Events (deprecated)

!!! warning
The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above.
The recommended way to handle the *startup* and *shutdown* is using the `lifespan` parameter of the `FastAPI` app as described above. If you provide a `lifespan` parameter, `startup` and `shutdown` event handlers will no longer be called. It's all `lifespan` or all events, not both.

You can probably skip this part.

Expand Down

0 comments on commit 7e0e16f

Please sign in to comment.