Use the PDF's existence to avoid sending duplicate emails

If the PDF is already on disk, it's a good sign that we've already sent
the email, so skip in that case.

To make the signal a bit more reliable, make writing the PDF to disk
the last action taken, in case sending the email fails.
This commit is contained in:
2023-04-03 12:40:08 +01:00
parent 41d2923fa9
commit 3d303aebf6
2 changed files with 10 additions and 4 deletions

View File

@@ -16,6 +16,5 @@ ureq = { version = "*", features = ["cookies"] }
codegen-units = 1
lto = true
opt-level = "z"
panic = "abort"
strip = true