Skip to content

Report exactly one email per run and none for an empty run - #45

Merged
zaihuaji merged 1 commit into
mainfrom
hua-work-dsquasar
Sep 24, 2026
Merged

zaihuaji merged 1 commit into
mainfrom
hua-work-dsquasar

Conversation

@zaihuaji

Copy link
Copy Markdown
Collaborator

Summary

  • The progress report is parked in dscheck.einfo instead of being sent, so it goes out exactly when PBS kills the job off its walltime - in the same daemon pass that resubmits the check. The final report sends directly and drops the parked one: left behind it would be mailed a second time as a stale report and would hold the finished check back from being purged.
  • A forked child could reach quit_dsquasar() and report for the whole run, emailing a duplicate, clearing the parent's parked report and marking the shared check record failed while the parent was still working. Only the parent reports now.
  • The report is dropped when nothing was processed and nothing failed, for every backup action rather than the transfer one alone. A parked progress report still forces a final report, to clean it up.
  • Version bumped to 3.0.13.

Test plan

  • 5 files -> 1 mail; 0 files with no error -> 0 mails; 0 files with an error count -> 1 mail; 0 files with a parked report -> 1 mail
  • -A 16 statistics and -A 8 check still report with 0 backup files; no -e/-E -> 0 mails; no dscheck -> 1 direct mail
  • Parent quit -> 1 mail; child quit -> 0 mails and sys.exit(1)
  • Deadline check called twice -> exactly 1 park; park then finish -> 1 mail and einfo cleared

…ion to 3.0.13

Park the progress report in dscheck.einfo instead of sending it, so it goes out
exactly when PBS kills the job off its walltime, and have the final report send
directly and drop the parked one - left behind it would be mailed a second time
as a stale report and would hold the finished check back from being purged.

A forked child could also reach quit_dsquasar() and report for the whole run,
emailing a duplicate, clearing the parent's parked report and failing the shared
check record while the parent was still working.

Drop the report altogether when nothing was processed and nothing failed, for
every backup action rather than the transfer one alone.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zaihuaji
zaihuaji merged commit be8112b into main Sep 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant