mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-11 04:56:41 +00:00
🐛 fix name of shutdown_event in docs (#105)
Fix name copy/paste name error in docs source for startup/shutdown events.
This commit is contained in:
parent
825f397918
commit
3ce2920fef
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("shutdown")
|
@app.on_event("shutdown")
|
||||||
def startup_event():
|
def shutdown_event():
|
||||||
with open("log.txt", mode="a") as log:
|
with open("log.txt", mode="a") as log:
|
||||||
log.write("Application shutdown")
|
log.write("Application shutdown")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue