prop/lib/microwaveprop/weather
Graham McIntire 14a2284321
Handle CDS "rejected" status + widen submit cap headroom
CDS returns status="rejected" (distinct from "failed") when a submit
is rate-limited past the 150-job per-user cap. The poll worker's
interpret_status_body treated this as an unknown status → generic
retryable error → 10 retries → discarded. 102 jobs hit this path
overnight.

Fix:
  * Era5Client.check_status/1 now returns {:rejected, reason} (and
    treats "dismissed" the same way — that's the status a manually
    deleted job transitions to).
  * Era5PollWorker handles :rejected exactly like :not_found: drop the
    DB row, clean up the sibling CDS job, re-enqueue the submit, and
    discard the current Oban job so it doesn't burn attempts retrying
    a terminal state.
  * Widened Era5SubmitWorker cap headroom from 10 → 30 (effective
    ceiling 120 not 140). The race between concurrent workers all
    passing the count check simultaneously meant we were reaching 141
    in-flight against the 150 hard cap; 30 slots of headroom tolerates
    a ~15-worker race before clipping CDS's ceiling.

Refactored handle_row/1 into handle_row + handle_non_both_done with a
leg_outcome/1 tag helper so the cross-product of leg statuses collapses
to a single pair match (credo complexity limit).
2026-04-14 08:26:42 -05:00
..
grib2 Speed up ERA5 batch pipeline: parallel CDS + stream downloads + hot index 2026-04-13 16:00:19 -05:00
era5_batch_client.ex Split ERA5 backfill into submit/poll workers with persistent CDS state 2026-04-13 16:26:26 -05:00
era5_cds_job.ex Split ERA5 backfill into submit/poll workers with persistent CDS state 2026-04-13 16:26:26 -05:00
era5_client.ex Handle CDS "rejected" status + widen submit cap headroom 2026-04-14 08:26:42 -05:00
era5_profile.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
frontal_analysis.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
grid_cache.ex Fix /weather 500 on cold cache, untrack k8s secret 2026-04-12 13:56:59 -05:00
hrrr_client.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
hrrr_climatology.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
hrrr_native_client.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
hrrr_native_profile.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
hrrr_profile.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
iem_client.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
iemre_observation.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
metar_5min_observation.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
mrms_cache.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
mrms_client.ex Add MRMS rain mosaic, fix beacons crash, fix UTC clock flash 2026-04-12 14:49:20 -05:00
ncei_metar_client.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
nexrad_cache.ex Add more caching to make the map feel instant 2026-04-12 12:26:25 -05:00
nexrad_client.ex Nudge HRRR scores with live ASOS obs between runs 2026-04-12 14:27:27 -05:00
nexrad_observation.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
rtma_client.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
rtma_observation.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
solar_client.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
solar_index.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
sounding.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
sounding_params.ex Fix credo warnings: struct specs, length/1, and test patterns 2026-04-12 10:26:53 -05:00
station.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
surface_observation.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00
theta_e.ex Guard against zero specific humidity in theta-e computation 2026-04-11 12:52:32 -05:00
uwyo_sounding_client.ex Ingest Canadian radiosondes via UWYO + plans for RDPS/HRDPS 2026-04-13 09:14:34 -05:00
weather_layers.ex Add dialyzer specs and types across the codebase 2026-04-12 08:55:04 -05:00