apply_valid_rows only matched {:ok, _} and {:error, %Changeset{}}, so when
Radio.create_contact returned {:error, :duplicate, existing} — the race
window where preview flagged a row as new but another writer inserts the
same contact before the worker picks up the chunk — the reduce callback
crashed with FunctionClauseError. Oban retried the chunk, rolling back
the Postgrex transaction and surfacing the DBConnection errors the
operator was seeing.
Treat :duplicate as a silent skip: the row is already in the DB, there
is nothing to insert, and the counter should not double-count the existing
contact as an error either.
|
||
|---|---|---|
| .. | ||
| adif_import.ex | ||
| band_resolver.ex | ||
| callsign_client.ex | ||
| contact.ex | ||
| contact_edit.ex | ||
| csv_import.ex | ||
| edit_notifier.ex | ||
| enrichment_status.ex | ||
| import_matcher.ex | ||
| import_run.ex | ||
| maidenhead.ex | ||