defmodule Mix.Tasks.ResetEnrichment do @shortdoc "Reset weather/HRRR/IEMRE enrichment flags for re-processing" @moduledoc """ Resets weather, HRRR, and IEMRE enrichment flags on all QSOs so the next enqueue worker run re-processes them with multi-point path data. Does NOT reset terrain_queued since terrain profiles are path-based (pos1→pos2) and don't change with multi-point enrichment. mix reset_enrichment """ use Mix.Task import Ecto.Query alias Microwaveprop.Radio.Qso alias Microwaveprop.Repo @impl Mix.Task def run(_args) do Mix.Task.run("app.start") {count, _} = Qso |> where([q], q.weather_queued == true or q.hrrr_queued == true or q.iemre_queued == true) |> Repo.update_all(set: [weather_queued: false, hrrr_queued: false, iemre_queued: false]) Mix.shell().info("Reset enrichment flags on #{count} QSOs") :ok end end