prop/lib/microwaveprop/workers
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
..
admin_task_worker.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
asos_adjustment_worker.ex Stop AsosAdjustmentWorker from yanking 120 MB of JSONB per tick 2026-04-14 10:37:05 -05:00
backfill_enqueue_worker.ex Give up on stuck :queued backfill contacts after 3 days 2026-04-13 17:20:18 -05:00
canadian_sounding_fetch_worker.ex Ingest Canadian radiosondes via UWYO + plans for RDPS/HRDPS 2026-04-13 09:14:34 -05:00
contact_weather_enqueue_worker.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
era5_fetch_worker.ex Batch ERA5 fetches by month and 2° tile 2026-04-09 13:01:49 -05:00
era5_month_batch_worker.ex Split ERA5 backfill into submit/poll workers with persistent CDS state 2026-04-13 16:26:26 -05:00
era5_poll_worker.ex Abandon ERA5 jobs stuck in CDS queue > 4h 2026-04-14 08:31:10 -05:00
era5_submit_worker.ex Handle CDS "rejected" status + widen submit cap headroom 2026-04-14 08:26:42 -05:00
hrrr_fetch_worker.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
hrrr_native_grid_worker.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
iemre_fetch_worker.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
mrms_fetch_worker.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
nexrad_worker.ex Fix NexradWorker UUID type: use generate() not bingenerate() for insert_all 2026-04-10 14:13:38 -05:00
propagation_grid_worker.ex Wire NEXRAD, native ducts, and commercial links into scoring 2026-04-13 12:08:15 -05:00
propagation_prune_worker.ex Decouple propagation_scores pruning from the compute worker 2026-04-09 12:30:10 -05:00
rtma_fetch_worker.ex Add ERA5 reanalysis and RTMA data sources 2026-04-07 12:04:16 -05:00
solar_index_worker.ex Database performance fixes and async backfill enqueue 2026-04-04 19:19:18 -05:00
terrain_profile_worker.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00
weather_fetch_worker.ex Fix all remaining credo --strict issues (0 issues) 2026-04-12 10:26:53 -05:00