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,5 +1,9 @@
# HTMX-PATTERNS CHANGELOG
## 0.0.4
* fix simulated load need asyncio.sleep
## 0.0.3
* fix docker `ENV=prod`

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

View file

@ -2,8 +2,9 @@ default:
@just --list
build-image:
podman build -t docker.io/waylonwalker/htmx-patterns-waylonwalker-com:0.0.3 .
podman build -t docker.io/waylonwalker/htmx-patterns-waylonwalker-com:$(hatch version) .
push-image:
podman push docker.io/waylonwalker/htmx-patterns-waylonwalker-com:0.0.3
podman push docker.io/waylonwalker/htmx-patterns-waylonwalker-com:$(hatch version)