add cron jobs#9
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 (10)
📝 WalkthroughWalkthroughAdds a daily GitHub Actions maintenance request, a protected backend route that runs three jobs concurrently, and a cron secret check before the jobs execute. ChangesMaintenance automation
Sequence Diagram(s)sequenceDiagram
participant DailyMaintenanceWorkflow as Daily Maintenance workflow
participant jobsMaintainanceRouter as jobsMaintainanceRouter
participant verifyCronSecret as verifyCronSecret
participant jobsMaintainance as jobsMaintainance
participant syncRate as syncRate
participant sendReminder as sendReminder
participant sendExpired as sendExpired
participant Prisma as Prisma
DailyMaintenanceWorkflow->>jobsMaintainanceRouter: POST /api/jobs/maintainance
jobsMaintainanceRouter->>verifyCronSecret: read x-cron-secret
verifyCronSecret-->>jobsMaintainanceRouter: allow or 401
jobsMaintainanceRouter->>jobsMaintainance: invoke controller
jobsMaintainance->>syncRate: Promise.allSettled
jobsMaintainance->>sendReminder: Promise.allSettled
jobsMaintainance->>sendExpired: Promise.allSettled
syncRate->>Prisma: upsert EUR rates
sendReminder->>Prisma: create notifications
sendExpired->>Prisma: update expired subscriptions
jobsMaintainance-->>DailyMaintenanceWorkflow: JSON response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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 |
Summary by CodeRabbit
New Features
Bug Fixes
Chores