- Replace stub propagation.ex with real implementation (score_grid_point, upsert_scores, latest_scores, latest_valid_time) - Add PropagationGridWorker (hourly Oban cron) for CONUS grid scoring - Add mix propagation_grid task for manual triggering - Fix duplicate extract_grid/2 from parallel merges - Fix extract_grid to skip outside-grid points instead of erroring - Add propagation queue to Oban config
18 lines
500 B
Elixir
18 lines
500 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
|
|
Mix.Task.run("app.start")
|
|
|
|
IO.puts("Starting propagation grid computation...")
|
|
|
|
case Microwaveprop.Workers.PropagationGridWorker.perform(%Oban.Job{args: %{}}) do
|
|
:ok -> IO.puts("Done!")
|
|
{:error, reason} -> IO.puts("Error: #{inspect(reason)}")
|
|
end
|
|
end
|
|
end
|