Let a coach schedule a line-up to publish itself later

Publish now still works exactly as before (default action), but a coach
can also pick a future date/time -- events.services.lineup.
schedule_lineup_publish sets Lineup.scheduled_publish_at, and a new
periodic task (events.tasks.publish_scheduled_lineups, every 15 minutes)
publishes it once that time arrives via the same publish_lineup used for a
manual publish, so selection/Attendance/notifications all work identically
either way. A pending schedule can be cancelled or published early from the
same screen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
2026-08-22 20:52:22 +02:00
parent 3b634fda22
commit 1d0c2ef299
11 changed files with 288 additions and 16 deletions

View File

@@ -20,6 +20,11 @@ JOB_REGISTRY = {
"description": _("Nudges whoever still hasn't answered an event, one week before its answer deadline (or its start, when no deadline is set)."),
"schedule": _("Daily at 07:00"),
},
"events.tasks.publish_scheduled_lineups": {
"label": _("Publish scheduled line-ups"),
"description": _("Publishes any line-up whose coach-picked publish time has arrived."),
"schedule": _("Every 15 minutes"),
},
"billing.tasks.renew_subscriptions": {
"label": _("Renew subscriptions"),
"description": _("Opens the next billing period for clubs whose current one is running out."),