digest.agent: document journal_update workflow

Check if the current period's digest exists and update it with
journal_update before starting a new one with journal_new.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-12 02:06:55 -04:00
parent b77f07fef7
commit 31aa0f3125

View file

@ -23,7 +23,11 @@ summaries into weekly ones.
2. Read the undigested entries with `journal_tail` (level 0, after 2. Read the undigested entries with `journal_tail` (level 0, after
the last digest date). the last digest date).
3. Write the digest with `journal_new` using the appropriate level: 3. Check if the most recent digest at this level should be updated
(same date/week/month) — if so, use `journal_update` with the
appropriate level to append to it.
4. If starting a new period, use `journal_new` with the level:
- level=1 for daily digests - level=1 for daily digests
- level=2 for weekly digests - level=2 for weekly digests
- level=3 for monthly digests - level=3 for monthly digests