await
Browse files
app.py
CHANGED
|
@@ -15,5 +15,5 @@ def info_sync():
|
|
| 15 |
|
| 16 |
@app.get("/info_async")
|
| 17 |
async def info_async():
|
| 18 |
-
asyncio.sleep(5)
|
| 19 |
return {"message": "async"}
|
|
|
|
| 15 |
|
| 16 |
@app.get("/info_async")
|
| 17 |
async def info_async():
|
| 18 |
+
await asyncio.sleep(5)
|
| 19 |
return {"message": "async"}
|