Scheduling infrastructure for absolutely everyone.
Setup delegation credential related crons (#21176)
Hariom Balharacecfcc7c6f77
diff --git a/apps/web/app/api/cron/credentials/route.ts b/apps/web/app/api/cron/credentials/route.tsindex e9eb87502e7..4879efed8c2 100644--- a/apps/web/app/api/cron/credentials/route.ts+++ b/apps/web/app/api/cron/credentials/route.ts@@ -1,3 +1,8 @@+/**+ * @description This route is used to create and delete Credential records for all members of an organization that has delegation credentials enabled.+ *+ * It also deletes Credential records for all members of an organization that has delegation credentials disabled.+ */import type { NextRequest } from "next/server";import { NextResponse } from "next/server";diff --git a/apps/web/app/api/cron/selected-calendars/route.ts b/apps/web/app/api/cron/selected-calendars/route.tsindex 897c3483a7d..a94fe0a27dc 100644--- a/apps/web/app/api/cron/selected-calendars/route.ts+++ b/apps/web/app/api/cron/selected-calendars/route.ts@@ -1,3 +1,8 @@+/**+ * @description This route is used to create SelectedCalendar records based on Credential records corresponding to Delegation Credentials+ *+ * It works in conjunction with `/api/cron/credentials` route(which creates the Credential records for all the members of an organization that has delegation credentials enabled)+ */import type { NextRequest } from "next/server";import { NextResponse } from "next/server";diff --git a/apps/web/vercel.json b/apps/web/vercel.jsonindex dc6e6899d06..3e648c6b08e 100644--- a/apps/web/vercel.json+++ b/apps/web/vercel.json@@ -15,6 +15,14 @@{"path": "/api/tasks/cleanup","schedule": "0 0 * * *"+ },+ {+ "path": "/api/cron/credentials",+ "schedule": "*/5 * * * *"+ },+ {+ "path": "/api/cron/selected-calendars",+ "schedule": "*/5 * * * *"}],"functions": {