Review
Nightly email digest job
Sends the weekly activity digest to all opted-in users from a nightly cron task.
FastAPITier 5backendobservability
Click a line to flag it, pick one or more labels, then submit. If the change looks correct, approve it.
app/jobs/digest.py+7-0
| 14 | + | def send_digests(): | |
| 15 | + | users = db.query(User).filter(User.digest_opt_in).all() | |
| 16 | + | for user in users: | |
| 17 | + | try: | |
| 18 | + | send_email(user.email, build_digest(user)) | |
| 19 | + | except Exception: | |
| 20 | + | pass |