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,5 +1,9 @@
|
|||
# HTMX-PATTERNS CHANGELOG
|
||||
|
||||
## 0.0.4
|
||||
|
||||
* fix simulated load need asyncio.sleep
|
||||
|
||||
## 0.0.3
|
||||
|
||||
* fix docker `ENV=prod`
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
{
|
||||
|
|
|
|||
5
justfile
5
justfile
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue