Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

format prisma, update cron timing

Steven Teyfa4fbab79a98
diff --git a/apps/web/app/api/cron/usage/route.ts b/apps/web/app/api/cron/usage/route.ts
index 5fcb936f9c..805bebcdd9 100644
--- a/apps/web/app/api/cron/usage/route.ts
+++ b/apps/web/app/api/cron/usage/route.ts
@@ -4,7 +4,7 @@ import { NextResponse } from "next/server";
import { updateUsage } from "./utils";
// Cron to update the usage stats of each workspace.
-// Runs once every day at 7AM PST (0 14 * * *)
+// Runs once every day at noon UTC (0 12 * * *)
export async function GET(req: Request) {
const validSignature = await verifySignature(req);
diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma
index 3b5df1b4b1..5cb20fc19d 100644
--- a/apps/web/prisma/schema.prisma
+++ b/apps/web/prisma/schema.prisma
@@ -119,7 +119,7 @@ model Project {
tags Tag[]
customers Customer[]
defaultDomains DefaultDomains[]
-
+
@@index(usageLastChecked(sort: Asc))
}
diff --git a/apps/web/vercel.json b/apps/web/vercel.json
index b78998b618..c42971f183 100644
--- a/apps/web/vercel.json
+++ b/apps/web/vercel.json
@@ -6,7 +6,7 @@
},
{
"path": "/api/cron/usage",
- "schedule": "0 14 * * *"
+ "schedule": "0 12 * * *"
},
{
"path": "/api/cron/links/usage",