Files
Curio/jobs/index.ts
T
arnaudne 4e38b5a791 feat: initial commit — Curio mastery tutor
Full Next.js App Router application with:
- AI-graded lesson checkpoints (BKT/Elo mastery tracking)
- Auth.js v5: credentials, Google, GitHub, generic OIDC
- Anonymous-session-first with migrate-on-signin
- Admin panel: users, blueprints, reports, site settings
- Password reset + email verification (nodemailer/SMTP)
- Site config: require_auth + signups_enabled flags
- server-only guards on all DB/generation/verification modules
- PostgreSQL 16 + pgvector, Redis cache, Drizzle ORM
- 271 unit tests (Vitest), golden-eval harness, Playwright e2e stubs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 22:25:43 +02:00

18 lines
593 B
TypeScript

import generateLessonWorker from './generate-lesson-job';
import promoteBlueprintWorker from './promote-blueprint-job';
console.log('[workers] Running: generate-lesson, promote-blueprint');
async function shutdown(signal: string) {
console.log(`[workers] ${signal} received — draining and closing workers...`);
await Promise.all([
generateLessonWorker.close(),
promoteBlueprintWorker.close(),
]);
console.log('[workers] Shutdown complete.');
process.exit(0);
}
process.on('SIGTERM', () => void shutdown('SIGTERM'));
process.on('SIGINT', () => void shutdown('SIGINT'));