- HrrrClient.hrrr_url accepts forecast_hour param (wrfsfcfHH.grib2) - PropagationGridWorker fetches all 19 forecast hours per run - Propagation.scores_at/3 queries scores at specific valid_time - Propagation.available_valid_times/1 returns all forecast times for timeline - Pruning keeps scores with valid_time >= now - 2h (forecast-aware) - MapLive: select_time event, timeline data pushed to JS - JS: forecast timeline bar at bottom of map with clickable hour buttons - PubSub broadcast sends list of valid_times instead of single time
27 lines
671 B
Elixir
27 lines
671 B
Elixir
defmodule Mix.Tasks.PropagationGrid do
|
|
@shortdoc "Compute propagation scores for the CONUS grid"
|
|
|
|
@moduledoc "Manually trigger propagation grid computation."
|
|
use Mix.Task
|
|
|
|
@impl Mix.Task
|
|
def run(_args) do
|
|
# Pause all Oban queues so backfill jobs don't run alongside the grid fetch
|
|
Application.put_env(
|
|
:microwaveprop,
|
|
Oban,
|
|
Keyword.put(
|
|
Application.get_env(:microwaveprop, Oban, []),
|
|
:queues,
|
|
false
|
|
)
|
|
)
|
|
|
|
Mix.Task.run("app.start")
|
|
|
|
IO.puts("Starting propagation grid computation...")
|
|
|
|
Microwaveprop.Workers.PropagationGridWorker.perform(%Oban.Job{args: %{}})
|
|
IO.puts("Done!")
|
|
end
|
|
end
|