chore: add Supabase keepalive endpoint and schedule cron job#33
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a Supabase health check cron job. A new Next.js API route authenticates requests, creates a Supabase admin client, queries the profiles table, measures latency, and returns status. Vercel's cron configuration is updated to trigger this endpoint daily at 03:00 UTC. ChangesSupabase Keepalive Cron Health Check
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
This pull request introduces a scheduled health check endpoint for Supabase and configures a Vercel cron job to periodically invoke it. The main goal is to ensure the Supabase connection remains active and to monitor its health.
Supabase keepalive endpoint:
app/api/cron/supabase-keepalive/route.tsthat performs an authenticated health check on the Supabaseprofilestable, returning latency and row count information; it responds with an error if the check fails or if authorization is invalid.Cron job configuration:
vercel.jsonto schedule a daily (3:00 AM UTC) cron job that triggers the new/api/cron/supabase-keepaliveendpoint, ensuring regular health checks.Summary by CodeRabbit