Commit Graph
3 Commits
Author SHA1 Message Date
jschoubben d514eb57a3 Name an unknown circuit, layout or year with a 404 instead of a 500
The circuit and track routes walked circuits.json with chained lookups, so an unknown country, locality, circuit
or layout, or a year no layout covers, raised and answered 500 (/circuits/photos.json among them). One lookup now
names the first unknown part and the API answers it 404. numpy loads only where a script uses it, so the models,
and this lookup's test, need the standard library alone.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 15:13:34 +01:00
jschoubben d9c6fdc46c Back off a failed Jolpica ask; render posters off the event loop
Review round 1 (two findings):
- While Jolpica failed, every schedule read asked it again, up to four
  times per poster request, and the poster, thumb and grand-prix routes
  were async, so the pacing, a 429's pause and a timeout stalled every
  request. A failed ask is now remembered for ten minutes (the kept
  schedule, or none, is answered meanwhile), a schedule in memory is
  answered without waiting for an ask under way, and those routes are
  plain defs in the threadpool. A rendered picture is stored whole
  (written aside, then renamed), as two may now render it side by side.
- Bytecode was tracked: tests/__pycache__ (added with the tests) and
  models/__pycache__ that the cleanup missed. Untracked; .gitignore
  already names __pycache__/.

From the review's notes: a poster whose map or photo failed is sent with
a five-minute cache instead of a year's; uvicorn trusts the proxy's
forwarded headers, so /examples redirects to https, not http; stale
comments naming CARTO and the zoom lookup's key are corrected.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
2026-11-27 10:24:04 +01:00
jschoubben c94ebcfb22 Add all local circuit work — year-by-year SVGs and tooling 2026-03-25 22:17:47 +01:00