prop/lib/microwaveprop
Graham McIntire 805bbff330
Stop AsosAdjustmentWorker from yanking 120 MB of JSONB per tick
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.
2026-04-14 10:37:05 -05:00
..
accounts Send mail as prop@w5isp.com with reply-to graham@mcintire.me 2026-04-12 14:00:38 -05:00
backtest Fix all 12 dialyzer warnings 2026-04-11 18:08:18 -05:00
beacon_monitors Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
callsign_location Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
commercial Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
propagation Show aggregated propagation pipeline status on the map 2026-04-14 10:01:34 -05:00
qrz Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
radio Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
terrain Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
weather Handle CDS "rejected" status + widen submit cap headroom 2026-04-14 08:26:42 -05:00
workers Stop AsosAdjustmentWorker from yanking 120 MB of JSONB per tick 2026-04-14 10:37:05 -05:00
accounts.ex User profiles at /u/:callsign, flexible band input, assorted UX cleanup 2026-04-12 16:13:08 -05:00
application.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
backtest.ex Phase 9.3, 9.4, and Phase 3 NEXRAD pipeline 2026-04-10 12:48:36 -05:00
beacon_monitors.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
beacons.ex Convert /beacons approved list to live_table 2026-04-12 17:15:05 -05:00
cache.ex Cache /contacts, fix map blink, make mode optional 2026-04-12 12:47:25 -05:00
callsign_location.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
commercial.ex Wire NEXRAD, native ducts, and commercial links into scoring 2026-04-13 12:08:15 -05:00
geo.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
geocoder.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
mailer.ex Send mail as prop@w5isp.com with reply-to graham@mcintire.me 2026-04-12 14:00:38 -05:00
markdown.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
propagation.ex Stop AsosAdjustmentWorker from yanking 120 MB of JSONB per tick 2026-04-14 10:37:05 -05:00
qrz.ex Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
radio.ex Convert /admin/contact-edits list to live_table 2026-04-12 17:18:47 -05:00
release.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
repo.ex initial 2026-03-28 11:28:47 -05:00
repo_listener.ex Replace polling with Postgres LISTEN/NOTIFY for live updates 2026-04-02 16:26:22 -05:00
terrain.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
weather.ex Stop PropagationGridWorker crash-looping on forecast hours 2026-04-13 08:20:28 -05:00