AsosAdjustmentWorker fires every 10 minutes and loads every row of `hrrr_profiles` on the grid for the latest valid_time. The old query selected `profile: h.profile` — ~1.3 KB of JSONB × 92k grid points ≈ 120 MB of JSONB per tick. Postgrex's Jason.decode! ran inline for each row and blew past the 15 s pool checkout window, so every tick was killing connections with: DBConnection.ConnectionError: client timed out because it queued and checked out the connection for longer than 15000ms `score_grid_point/4` only touched the profile array to re-derive `min_refractivity_gradient`, but `hrrr_profiles` already persists that value as a scalar column at ingestion time. Teach `derive_from_hrrr/1` to honour the persisted scalar when it's present and drop `h.profile` from the worker's SELECT list. Net effect: same score math, ~1% of the JSONB transfer, tick stays under the pool deadline. Covered by a new scorer test that feeds a profile map with no `:profile` list and asserts the refractivity factor still reflects the persisted gradient instead of the neutral baseline. |
||
|---|---|---|
| .. | ||
| microwaveprop | ||
| microwaveprop_web | ||
| mix/tasks | ||
| microwaveprop.ex | ||
| microwaveprop_web.ex | ||