feat: auto-reload grid when background cache refresh completes
Docker / docker (push) Successful in 1m49s
Docker / docker (push) Successful in 1m49s
Poll /api/cache-ts every 30s; silently reload concerts if the cache timestamp increased (background scrape finished). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,12 @@ async def api_concerts(page: int = 1, search: str = "", page_size: int = 24, cat
|
||||
return await fetch_concerts(page=page, search=search, page_size=page_size, category=category)
|
||||
|
||||
|
||||
@app.get("/api/cache-ts")
|
||||
async def api_cache_ts():
|
||||
from arte_api import _cache
|
||||
return {"ts": _cache["ts"], "count": len(_cache["data"])}
|
||||
|
||||
|
||||
@app.post("/api/refresh")
|
||||
async def api_refresh():
|
||||
count = await invalidate_cache()
|
||||
|
||||
Reference in New Issue
Block a user