Remove shutdown()
This commit is contained in:
parent
535e8cebf9
commit
a202e062de
1 changed files with 0 additions and 10 deletions
|
|
@ -375,15 +375,5 @@ def startup() -> None:
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
|
|
||||||
|
|
||||||
@app.on_event("shutdown")
|
|
||||||
def shutdown() -> None:
|
|
||||||
"""This is called when the server shuts down.
|
|
||||||
|
|
||||||
It stops the scheduler."""
|
|
||||||
scheduler: BackgroundScheduler = BackgroundScheduler()
|
|
||||||
scheduler.shutdown()
|
|
||||||
reader.close()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run("main:app", log_level="debug", reload=True)
|
uvicorn.run("main:app", log_level="debug", reload=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue