A background check of a target table, as Trellis.self_check/3 starts it
and Trellis.self_check_job/2 reads it back.
idis whatTrellis.self_check_job/2takes.targetis the audited target's bare table name.modeis:standardor:strict, as the job was started. A secondTrellis.self_check/3of a target whose job is still running returns that job, so its mode is the first call's.stateis:queued(no worker has taken it up yet; with no drain worker anywhere in the fleet it stays so),:running, then:done,:failed(errorsays why) or:cancelled(the worker running it shut down;errorsays so). Only:donecarries a report.rows_comparedcounts the distinct keys the pages so far compared; it moves while the job is:running.reportis theTrellis.SelfCheckReport, once the job is:done.errorsays why a:failedor:cancelledjob ended.
A job ends when its transform is dropped, and Trellis.self_check_job/2
then returns nil for it.
Summary
Functions
Whether the job has ended, so polling it again changes nothing.
Types
@type state() :: :queued | :running | :done | :failed | :cancelled
@type t() :: %Trellis.SelfCheckJob{ error: String.t() | nil, id: integer(), mode: :standard | :strict, report: Trellis.SelfCheckReport.t() | nil, rows_compared: non_neg_integer(), state: state(), target: String.t() }