Mark terrain status complete when profile already exists

TerrainProfileWorker early-exited with :ok when a profile existed
but never updated the contact status, leaving contacts stuck at queued.
This commit is contained in:
Graham McIntire 2026-04-06 16:54:12 -05:00
parent 366258e329
commit 79130a39e8

View file

@ -19,6 +19,7 @@ defmodule Microwaveprop.Workers.TerrainProfileWorker do
@impl Oban.Worker
def perform(%Oban.Job{args: %{"contact_id" => contact_id}}) do
if Terrain.has_terrain_profile?(contact_id) do
Radio.set_enrichment_status!([contact_id], :terrain_status, :complete)
:ok
else
contact = Radio.get_contact!(contact_id)