Commit f98f0e2
committed
feat: multi-step cron — check-research route + ingest refactor + pg_cron SQL
- NEW: app/api/cron/check-research/route.ts (690 lines)
Polls NotebookLM research status every 5min. When complete:
imports sources, generates 5 infographics, enriches script, transitions to script_ready.
Includes stuck detection (>30min → flagged).
- MODIFIED: app/api/cron/ingest/route.ts
Fire-and-forget research: creates notebook + starts research in ~15s,
creates doc as "researching". Returns immediately.
Non-research path unchanged (straight to script_ready).
- MODIFIED: sanity/schemas/documents/automatedVideo.ts
Added "researching" status, researchNotebookId, researchTaskId,
trendScore, trendSources fields.
- NEW: supabase/migrations/002_cron_schedules.sql
pg_cron schedules for all 4 pipeline crons.1 parent f39e91f commit f98f0e2
File tree
4 files changed
+868
-16
lines changed- app/api/cron
- check-research
- ingest
- sanity/schemas/documents
- supabase/migrations
4 files changed
+868
-16
lines changed
0 commit comments