0.0.4 - fix simulated load
This commit is contained in:
parent
e68999c06b
commit
126e90084e
4 changed files with 10 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# SPDX-FileCopyrightText: 2024-present Waylon S. Walker <waylon@waylonwalker.com>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
__version__ = "0.0.3"
|
||||
__version__ = "0.0.4"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import asyncio
|
||||
import time
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
|
@ -22,7 +23,7 @@ async def infinite(request: Request, page: int = 1, n: int = 10):
|
|||
persons = [PersonFactory.build() for _ in range(n)]
|
||||
|
||||
if request.state.prefers_partial:
|
||||
time.sleep(1)
|
||||
await asyncio.sleep(0.5)
|
||||
return config.templates.TemplateResponse(
|
||||
"infinite/persons_partial.html",
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue