Skip to main content

Module request_digests

Module request_digests 

Source
Expand description

E-mail digest of the change requests that wait for triage, per project group.

Every CAD editor (and admin) of a project group gets – besides the immediate notification of every new request – a summary every TEAMCRAFT_REQUEST_DIGEST_HOURS (default: daily) of the requests of the group that are still new: the ones raised since the previous digest, and how many older ones still wait. No digest when nothing new came in.

A digest is a notification of the kind request_digest (muted on the account page like every other kind), queued for e-mail only and stored as read, so it does not count in the bell: crate::delivery sends it with its retries and checks again at sending time that the user may still read the group and every item the text names (mentioned_projects, mentioned_items). The table request_digests remembers per user and group up to when the digests covered the requests; it is updated in the transaction that queues the digest, so a restart or a second server never sends a period twice.

Structs§

DigestLine
A request in a digest.

Functions§

digest_text
Title and body of the digest of project (None = nothing new).
run_once
Queues the digests that are due (every period_hours; 0 = never). Returns how many were queued.
spawn
Starts the background task (nothing when period_hours is 0).