Browse Source

📝 Add warning about lifespan functions and backwards compatibility with events (#10734)

Co-authored-by: Alejandra <[email protected]>
pull/10950/head
Jacob McDonald 1 year ago
committed by GitHub
parent
commit
7e0e16fa36
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/en/docs/advanced/events.md

2
docs/en/docs/advanced/events.md

@ -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.

Loading…
Cancel
Save