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.

put redis.set in waitUntil

Steven Teydc4248e604ac
diff --git a/apps/web/lib/api/conversions/track-sale.ts b/apps/web/lib/api/conversions/track-sale.ts
index d903ed2a07..c9fca4eb72 100644
--- a/apps/web/lib/api/conversions/track-sale.ts
+++ b/apps/web/lib/api/conversions/track-sale.ts
@@ -559,12 +559,14 @@ const _trackSale = async ({
});
if (invoiceId) {
- await redis.set(
- `trackSale:${workspace.id}:invoiceId:${invoiceId}`,
- trackSaleResponse,
- {
- ex: 60 * 60 * 24 * 7, // cache for 1 week
- },
+ waitUntil(
+ redis.set(
+ `trackSale:${workspace.id}:invoiceId:${invoiceId}`,
+ trackSaleResponse,
+ {
+ ex: 60 * 60 * 24 * 7, // cache for 1 week
+ },
+ ),
);
}