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.

15 min window

Steven Tey257bbc0e84a0
diff --git a/apps/web/app/api/cron/links/[linkId]/complete-tests/route.ts b/apps/web/app/api/cron/links/[linkId]/complete-tests/route.ts
index 231593803d..cbb107bd3a 100644
--- a/apps/web/app/api/cron/links/[linkId]/complete-tests/route.ts
+++ b/apps/web/app/api/cron/links/[linkId]/complete-tests/route.ts
@@ -30,12 +30,12 @@ export async function POST(
// only complete tests if:
// - there are test variants
// - the tests completion time is in the past
- // - the tests completion time is within the last 1 minute
+ // - the tests completion time is within the last 15 minutes
if (
link.testVariants &&
link.testCompletedAt &&
link.testCompletedAt < new Date() &&
- Date.now() - link.testCompletedAt.getTime() < 60 * 1000 // Limit to 1 minute window
+ Date.now() - link.testCompletedAt.getTime() < 15 * 60 * 1000 // Limit to a 15-minute window
) {
await completeABTests(link);