Karta. Domains. Check
(Karta v1.0.0)
Checks domains again every hour: their ownership record
(Karta.Domains.check_ownership/2), their DKIM key rotations
(Karta.Domains.Rotation.advance/2, and, when the instance is set to
rotate keys on a schedule, Karta.Domains.Rotation.schedule/2), their records where
the instance publishes their zone (Karta.DNS.Publish.publish/2), the
CNAME record of the MTA-STS policy Karta serves for them
(Karta.MTASTS.Hosting.check_host/2) and their DNS health
(Karta.Domains.Health.run/2). A domain whose record is published after
it was added is verified without anyone asking; one whose record is gone
loses verification after Karta.Domains.ownership_grace/0; a rotation's
key is activated once its record is in DNS, and a retiring key retired a
week later; Karta's records are published, and removed when no longer
needed; the health results stay current.
The hourly job (an Oban cron job without arguments) queues one job per
domain that is due (Karta.Domains.due_for_check/1: every verified
domain, and unverified domains added in the last 7 days), those checked
longest ago first, at most one unfinished job per domain. That job
(%{"id" => id}) checks the domain with the configured resolver; a
domain removed meanwhile is skipped.
Summary
Functions
Queues a check of every domain that is due; returns how many were queued.
Functions
@spec schedule(DateTime.t()) :: non_neg_integer()
Queues a check of every domain that is due; returns how many were queued.