The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
delay is in seconds, not ms
Steven Tey0106e258e709
diff --git a/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts b/apps/web/app/api/stripe/webhook/customer-subscription-deleted.tsindex cc4ff29a3e..e38f3fee23 100644--- a/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts+++ b/apps/web/app/api/stripe/webhook/customer-subscription-deleted.ts@@ -135,8 +135,7 @@ export async function customerSubscriptionDeleted(event: Stripe.Event) {qstash.publishJSON({url: `${APP_DOMAIN_WITH_NGROK}/api/cron/emails/cancellation-feedback`,// artificially delay anywhere between 3-5 hours to make it feel more like a human- delay:- Math.floor(Math.random() * 1000 * 60 * 60 * 3) + 3 * 1000 * 60 * 60,+ delay: Math.floor(Math.random() * 60 * 60 * 3) + 3 * 60 * 60,body: {owners: workspaceUsers,},diff --git a/apps/web/app/api/stripe/webhook/customer-subscription-updated.ts b/apps/web/app/api/stripe/webhook/customer-subscription-updated.tsindex 53f23950b5..e604e27ec3 100644--- a/apps/web/app/api/stripe/webhook/customer-subscription-updated.ts+++ b/apps/web/app/api/stripe/webhook/customer-subscription-updated.ts@@ -97,8 +97,7 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {await qstash.publishJSON({url: `${APP_DOMAIN_WITH_NGROK}/api/cron/emails/cancellation-feedback`,// artificially delay anywhere between 3-5 hours to make it feel more like a human- delay:- Math.floor(Math.random() * 1000 * 60 * 60 * 3) + 3 * 1000 * 60 * 60,+ delay: Math.floor(Math.random() * 60 * 60 * 3) + 3 * 60 * 60,body: {owners,reason: cancelReason,