SaltDns. Registrar. Worker
(Salt v1.0.0)
The registrar's background work, an Oban job on the default queue that is
scheduled only while SALT_DNS_REGISTRAR=on (SaltDns.Registrar.Schedule).
Two tasks, named by the job's task argument:
"sweep"(every 5 minutes):- operations that are
:pending(the registrar had not finished, a transfer for instance) are resolved by reading their domain again (SaltDns.Registrar.sweep_pending/0); - operations that have been
:startedfor longer than the stale time (a crash or a timeout in the middle) are looked up at the registrar and completed from what is found (SaltDns.Registrar.resume_stuck/0).
- operations that are
"refresh"(once a day): every registered domain that has not been read for 20 hours is read again: expiry, status, lock, name servers (SaltDns.Registrar.refresh_domains/0)."remind"(once a day): the expiry reminders that are due go out (SaltDns.Registrar.send_expiry_reminders/0; seeSaltDns.Registrar.Reminders).
The worker never places an order. For a stuck operation it asks the
registrar whether the name is there and only completes the operation or
leaves it open: if nothing was ordered, the operation waits for the caller's
next call with the same reference. The only adapter call it can make for an
operation is lookup/2 (SaltDns.Registrar.complete_from_lookup/1); a price
read, a registration, a transfer, a renewal or a restore are not reachable
from here. A test checks it with an adapter that records its calls.