mirror of https://github.com/tiangolo/fastapi.git
📝 Mention in docs that subapps don't fire events (#1554)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
parent
5a3c5f1523
commit
d63475bb7d
|
|
@ -4,6 +4,9 @@ You can define event handlers (functions) that need to be executed before the ap
|
||||||
|
|
||||||
These functions can be declared with `async def` or normal `def`.
|
These functions can be declared with `async def` or normal `def`.
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
Only event handlers for the main application will be executed, not for [Sub Applications - Mounts](./sub-applications.md){.internal-link target=_blank}.
|
||||||
|
|
||||||
## `startup` event
|
## `startup` event
|
||||||
|
|
||||||
To add a function that should be run before the application starts, declare it with the event `"startup"`:
|
To add a function that should be run before the application starts, declare it with the event `"startup"`:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue