Run background jobs on a pg-boss queue; add e2e tests, CI and deploy script
Timed jobs move from in-process timers to a job registry run by pg-boss: once per schedule across processes, retries, run history, cron schedules in the church timezone, and an admin Background jobs page with Run now. Playwright end-to-end tests run against their own seeded database. A Gitea Actions workflow runs backend tests, frontend checks and the e2e tests, and deploys v* tags with scripts/deploy.sh once secrets are set. Also fixes the at-the-door check-in count for multi-day tickets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -163,3 +163,12 @@ export function currentSessionLabel(event: Pick<Event, "scheduleType" | "session
|
||||
const s = activeSessions(event.sessions).find(x => new Date(x.startsAt).toDateString() === today);
|
||||
return s ? sessionLabel(s, event.sessions) : null;
|
||||
}
|
||||
|
||||
/** The session of a multi-day event open for check-in today (browser's local day), or null. */
|
||||
export function todaysSession(event: Pick<Event, "scheduleType" | "sessions"> | null | undefined): EventSession | null {
|
||||
if (!event || event.scheduleType !== "sessions") return null;
|
||||
const today = new Date().toDateString();
|
||||
const now = Date.now();
|
||||
const list = activeSessions(event.sessions).filter(x => new Date(x.startsAt).toDateString() === today);
|
||||
return list.find(s => now <= new Date(s.endsAt).getTime()) || list[list.length - 1] || null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user