fix: example coroutine object is not iterable

This commit is contained in:
vvanglro
2022-09-15 17:30:59 +08:00
parent 3041af2216
commit 3dd4887b37

View File

@@ -43,9 +43,9 @@ async def get_data(request: Request, response: Response):
@app.get("/blocking")
@cache(namespace="test", expire=10)
def blocking():
async def blocking():
time.sleep(5)
return dict(ret=get_ret())
return dict(ret=await get_ret())
@app.get("/datetime")