Added missing weight emails
Deploy / deploy-dev (push) Successful in 2m15s
Deploy / deploy-prod (push) Skipped

This commit is contained in:
blaisadmin
2026-09-05 22:51:39 -04:00
parent b4254a68fa
commit 5abc7f6174
13 changed files with 501 additions and 0 deletions
+20
View File
@@ -161,6 +161,26 @@ npm run build
npm run worker
```
### Overdue weight emails
The worker checks every five minutes for living birds with no new weight entry in
48 hours. Each accepted owner, assistant, or caregiver receives one email per flock
listing all birds due for a reminder. Pending invitees and viewers are excluded.
Reminders repeat every 48 hours while overdue; adding a new weight restarts the
48-hour clock. Birds without weights use their profile creation time.
The clock uses the weight entry's creation timestamp, since the measurement date
has no time of day. Editing an existing entry does not restart the clock; entering
a historical weight does. Memorialized birds are excluded.
`WEIGHT_REMINDERS_ENABLED` defaults to `true` in both Compose stacks. Set it to
`false` to disable delivery. The worker, Redis, Postgres, and existing SMTP settings
must be available. The schema initializer creates the delivery tracking table.
Missing SMTP configuration or failed sends leave reminders eligible for retry.
Delivery tracking prevents ordinary repeat sends and concurrent claims; as with
other SMTP delivery, a crash after acceptance but before saving delivery can cause
a duplicate on retry.
## Auth and flock notes
- One user can belong to multiple flocks.