Phase 11, step 2: the journal's daily anchor by mail
Every day from 07:00 Chiang Mai time the app mails the journal's last entry number and its hash to the addresses set on the Notifications page (src/anchor.rs, migration 0012: settings, journal_anchors), when anything was added since the last anchor that went out. A day without news is noted without a mail; a failed send is tried again after an hour; a transaction-level advisory lock keeps two runs from both sending. "Send the anchor now" sends at once. Each mail says whether the chain checked whole (in capitals when it did not) and links to /journal/anchor, which compares a kept entry number and hash with the journal now: the same hash, another one, or no such entry. Changing the recipients is itself a journal entry. Every anchor mail is in the notifications log. Tests: the daily rule (before seven, once a day, an hour after a failure), recipients checked and journaled, one mail per recipient with the head hash, unchanged days, by hand, the check page's three answers, and a chain broken around the app said in the mail. 126 unit, 67 integration.
This commit is contained in:
1 parent
94ad25b6fc
commit
72a4faf71a
14 files changed
+990
-22
No files matched your search
+6
-1
@@ -2174,6 +2174,11 @@ details.move[open] .mini {
|
||||
.kv + .form {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.meta + #result {
|
||||
.meta + #result,
|
||||
.meta + .notice {
|
||||
margin-top: 16px;
|
||||
}
|
||||
/* the anchor's log under its form */
|
||||
.form + .tblwrap {
|
||||
margin-top: 18px;
|
||||
}
|
||||
Reference in new issue
Block a user