shutdown
Browse files- App/app.py +5 -0
App/app.py
CHANGED
|
@@ -10,6 +10,11 @@ async def startup_event():
|
|
| 10 |
await bot.start()
|
| 11 |
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
@app.get("/")
|
| 14 |
def read_root():
|
| 15 |
return {"Hello": "World"}
|
|
|
|
| 10 |
await bot.start()
|
| 11 |
|
| 12 |
|
| 13 |
+
@app.on_event("shutdown")
|
| 14 |
+
async def shutdown_event():
|
| 15 |
+
await bot.stop()
|
| 16 |
+
|
| 17 |
+
|
| 18 |
@app.get("/")
|
| 19 |
def read_root():
|
| 20 |
return {"Hello": "World"}
|