Add a periodic deadline-reminder job for events, including recurring series
New events.tasks.send_deadline_reminders (daily beat schedule, registered in features.jobs.JOB_REGISTRY for the control panel's Jobs tab), the gap notify_new_event's own docstring flagged: a recurring series' occurrences never go through that on-creation path (they're bulk-generated by extend_event_series, and notifying per-occurrence there would flood everyone), so they never got any "you need to answer this" nudge at all. This sweeps every upcoming event once, one week before whichever cutoff matters -- the event's own answer deadline, or its start when none is set -- and notifies whoever's still NO_RESPONSE, using the same notify_members() -> Notification -> push chain notify_new_event already uses. New Event.deadline_reminder_sent_at makes it idempotent: each event's window opens once, is marked processed regardless of whether anyone needed notifying, and a missed run still catches anything whose window hasn't fully closed by the time the job next runs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -309,6 +309,7 @@ CELERY_TIMEZONE = TIME_ZONE
|
||||
#: jobs so a club that renews today isn't chased or archived for a period that just closed.
|
||||
CELERY_BEAT_SCHEDULE = {
|
||||
"extend-event-series": {"task": "events.tasks.extend_event_series", "schedule": crontab(hour=3, minute=0)},
|
||||
"send-deadline-reminders": {"task": "events.tasks.send_deadline_reminders", "schedule": crontab(hour=7, minute=0)},
|
||||
"renew-subscriptions": {"task": "billing.tasks.renew_subscriptions", "schedule": crontab(hour=4, minute=0)},
|
||||
"send-billing-reminders": {"task": "billing.tasks.send_billing_reminders", "schedule": crontab(hour=5, minute=0)},
|
||||
"archive-overdue-clubs": {"task": "billing.tasks.archive_overdue_clubs", "schedule": crontab(hour=6, minute=0)},
|
||||
|
||||
Reference in New Issue
Block a user