Translates the catalog's exact-candidate lifecycle decision into the public Elixir result vocabulary.
Registration and run claiming are one database statement. The statement
has committed before this module returns, so callers may enqueue only an
:enqueue result without exposing partially registered catalog state.
Summary
Functions
Atomically registers one exact manifest or diagnoses its existing import attempt.
Atomically replaces one failed latest attempt with an exact corrected manifest.
Types
@type accepted() :: %{ run_id: Ecto.UUID.t(), release_id: Ecto.UUID.t(), attempt: pos_integer(), reason: accepted_reason() }
@type accepted_reason() :: :registered | :retried | :same_owner | :completed
@type result() :: {:enqueue, accepted()} | {:existing, accepted()} | {:error, GeoGenius.CandidateError.t()}
Functions
@spec prepare_import(GeoGenius.Context.t(), GeoGenius.Manifest.t(), map()) :: result()
Atomically registers one exact manifest or diagnoses its existing import attempt.
@spec retry_failed( GeoGenius.Context.t(), Ecto.UUID.t(), GeoGenius.Manifest.t(), map() ) :: result()
Atomically replaces one failed latest attempt with an exact corrected manifest.