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.

Deduplicate sandbox payout charge-succeeded jobs in QStash

Kiran Kd163d0bd3bd3
diff --git a/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts b/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts
index 2eaf4f4c61..26ebe58f84 100644
--- a/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts
+++ b/apps/web/app/(ee)/api/cron/payouts/process/process-payouts.ts
@@ -309,7 +309,7 @@ export async function processPayouts({
await qstash.publishJSON({
url: `${APP_DOMAIN_WITH_NGROK}/api/cron/payouts/charge-succeeded`,
method: "POST",
- delay: 1 * 60,
+ delay: "1m",
flowControl: {
key: invoice.id,
rate: 1,
@@ -317,6 +317,7 @@ export async function processPayouts({
body: {
invoiceId: invoice.id,
},
+ deduplicationId: `sandbox-payouts-${invoice.id}`,
});
}