docs: README — data is wired to live MariaDB (was "currently SAMPLE")

The overview API reads live MariaDB since 2026-07-02; sample:true is only the
standalone dev fallback. Replaced the "wire it (TODO)" section with the live
column sources + resolved the notVerladen open question.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-07-06 11:14:22 +02:00
parent f36d3966ea
commit cc8a76cdef

View File

@ -99,23 +99,18 @@ figures — presses / on-the-way / oven are always real-time.
} }
``` ```
### Wiring the REAL data (currently SAMPLE) ### Live data wiring
`api/routes.py` returns sample data today. To make it live (see the big `TODO` there `api/routes.py` reads live MariaDB (`sample:true` only appears in the standalone
and `.claude/memory/temper-line-overview.md` in the gateway): dev fallback with no backend). Details + the exact column sources are in the gateway
memory `.claude/memory/temper-line-overview.md`. In short: it uses the kernel proxy
- Import the kernel proxy: `from .._db import run_select_query` (read-only). `from .._db import run_select_query` (read-only), un-scoped across **all** presses for
- Reuse the temper status-derivation in `modules/fastpress/press/temper.py` plant `PLANT_NAME` — press list from `press_settings.presses`; good/chips from
(`_temper_aggregates_all` derives on-way / in-oven / finished from planned `active_orders`+`rejects`; run/stop/idle from `cycles_new` recency; carts +
timestamps vs `NOW()`), un-scoped across **all** presses. Read `notVerladen` from `production.temper_tracking` with position derived in SQL from the
`production.temper_tracking` (carts grouped by `ttCartId`, keyed by origin press planned timestamps vs `NOW()` (reprints excluded). `finished` is scoped by `range` on
`ttPress`) + `production.active_orders`/`finished_orders`. `ttOutOfOvenAt`. Oven temperature is omitted (no sensor). Never echo customer/price
- `notVerladen` = produced good parts (cycles) parts logged to temper. **Open fields.
question:** per-press or plant-wide?
- Scope `finished` by `range` on `ttOutOfOvenAt`. Never echo customer/price fields.
Alternatively, add a public `GET /press/temper/overview` in fastpress and have the
frontend call that — decide before wiring; keep the payload shape above either way.
--- ---