0.0.4 - fix simulated load

This commit is contained in:
Waylon Walker 2024-04-06 08:43:15 -05:00
parent e68999c06b
commit 126e90084e
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
4 changed files with 10 additions and 4 deletions

View file

@ -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"

View file

@ -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",
{