From f0fa9e039301514abdc9b2422aa48636beb9cc50 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 25 Apr 2026 08:50:59 -0500 Subject: [PATCH] fix(propagation): fire grid cron every 15 min to catch fresh HRRR NOAA publish latency for HRRR pressure-level f18 straddles ~50-65 min after cycle hour. The HH:05 cron frequently probes a (now-1h) cycle that's not yet on S3 and falls back to (now-2h). Until today the next re-attempt was a full hour later, leaving weather visibly stale. Quadrupling the schedule lets pick_run_time/1 upgrade to the freshest cycle within 15 min of it publishing. seed_with_analysis is idempotent (on_conflict: :nothing), so re-fires against an already-seeded run_time are a single cheap INSERT batch. --- config/runtime.exs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 123007a8..5da21990 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -237,14 +237,16 @@ if config_env() == :prod do crontab: [ {"0 8 * * *", Microwaveprop.Workers.SolarIndexWorker}, {"*/5 * * * *", Microwaveprop.Commercial.PollWorker}, - # Hourly at :05. With scores written as binary files (not - # Postgres) and HRRR grid profile persistence removed, a - # full f00-f18 chain runs in ~45-60 min, so hourly fits. - # If one chain slips past 60 min the :propagation queue's - # concurrency-of-2 lets the next chain interleave; files - # are keyed by (band, valid_time) so last-writer-wins gives - # newer analysis data naturally. - {"5 * * * *", Microwaveprop.Workers.PropagationGridWorker}, + # Every 15 min. NOAA's HRRR pressure-level f18 publish latency + # straddles ~50-65 min after cycle hour, so an HH:05 fire + # frequently has to fall back from (now-1h) to (now-2h). A + # 4×/hour cadence lets pick_run_time/1 upgrade from fallback + # to the freshest cycle within 15 min of it becoming available + # instead of waiting for the next HH:05. Re-seeds are cheap: + # GridTaskEnqueuer.seed_with_analysis uses on_conflict: :nothing + # so duplicate fires for an already-seeded run_time are a single + # idempotent INSERT batch. + {"5,20,35,50 * * * *", Microwaveprop.Workers.PropagationGridWorker}, # GEFS runs publish ~3-4h after the 00/06/12/18Z cycle; seed the # Day 2-7 outlook 5h after each run to stay safely past NOMADS' # publication lag. Seeder enqueues f024-f168 at 6-hour cadence