mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2026-04-06 13:11:28 +02:00
feat: Card Kingdom prices, shopping cart export, and hover panel fixes (#73)
* feat: add CK prices, shopping cart export, and hover panel fixes * fix: include commander in Buy This Deck cart export
This commit is contained in:
parent
dd996939e6
commit
69d84cc414
24 changed files with 899 additions and 146 deletions
|
|
@ -82,6 +82,17 @@ async def _lifespan(app: FastAPI): # pragma: no cover - simple infra glue
|
|||
get_similarity() # Pre-initialize singleton (one-time cost: ~2-3s)
|
||||
except Exception:
|
||||
pass
|
||||
# Warm up price cache in background so first deck view request is fast
|
||||
try:
|
||||
import threading as _threading
|
||||
from .services.price_service import get_price_service as _get_ps
|
||||
_ps = _get_ps()
|
||||
_t = _threading.Thread(target=_ps._ensure_loaded, daemon=True, name="price-cache-warmup")
|
||||
_t.start()
|
||||
_t2 = _threading.Thread(target=_ps._ensure_ck_loaded, daemon=True, name="ck-price-cache-warmup")
|
||||
_t2.start()
|
||||
except Exception:
|
||||
pass
|
||||
# Start price auto-refresh scheduler (optional, 1 AM UTC daily)
|
||||
if PRICE_AUTO_REFRESH:
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue