add caching, add to stats

This commit is contained in:
C committed 2026-01-05 16:01:36 -08:00
1 parent ab3297acfb
commit dfd2c2f07d
5 files changed
+62 -6

No files matched your search

+3 -1
View File
@@ -67,10 +67,11 @@ async def get_stats():
"""
Get daily statistics for LEGO inventory.
Returns metrics about enrichment progress, missing data, and catalog value.
Returns metrics about enrichment progress, missing data, catalog value, and cache stats.
"""
try:
daily_stats = await stats.get_daily_stats()
cache_stats = await stats.get_brickset_cache_stats()
# Calculate completion percentage
if daily_stats["total_items"] > 0:
@@ -84,6 +85,7 @@ async def get_stats():
"status": "success",
"stats": daily_stats,
"completion_rate": round(completion_rate, 1),
"brickset_cache": cache_stats,
}
except Exception as e:
return JSONResponse(