A domain's queued tasks follow it: deleted, set to manual, or replaced #332

Merged
jcoffey-dev merged 2 commits from fix/327-domain-tasks into main 2026-11-09 07:04:32 +00:00
2 Commits
Author SHA1 Message Date
jcoffey-dev c336b24073 Mark acme.rs and dkim.rs as modified for INBUXA (#327)
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 8m45s
2026-11-08 23:55:23 -07:00
jcoffey-dev 373d47e5bd A domain's queued tasks follow it: deleted, set to manual, or replaced (#327)
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Failing after 8m55s
A domain's DKIM, DNS and certificate renewal tasks were left behind:

- Deleting the domain left them queued. When they ran they ended as
  Failed ("Domain not found"), and stayed in the task list.
- Setting DKIM key management to manual left the rotation task, which
  later failed with "not set to automatic".
- Setting it back to automatic queued a new DKIM task beside the old
  one, so the domain had two.

Now:

- Deleting a domain removes its DKIM management, DNS management and
  certificate renewal tasks.
- A save that turns DKIM, DNS or certificate management from automatic
  to manual removes the matching task.
- A save that queues a DKIM task removes the domain's queued one first,
  the way a new renewal already replaces the queued one (#290).
- A task whose domain is gone, or no longer manages that part itself,
  ends quietly instead of as Failed, so installs that already have
  stale tasks clear them on their next run.

clear_queued_renewals is now one case of clear_queued_domain_tasks. A
task that's running at that moment is left alone, as before.

The DKIM automation test checks that manual removes the task, automatic
again leaves one, a second save still leaves one, and deleting the
domain leaves none. Reported on the forum (t/232, posts 8 and 9).
2026-11-08 23:33:01 -07:00