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.

skipRedisCache for bulk imports

Steven Tey272e9256cff3
diff --git a/apps/web/app/(ee)/api/cron/import/csv/route.ts b/apps/web/app/(ee)/api/cron/import/csv/route.ts
index fdf206bdf0..1dd62a9af4 100644
--- a/apps/web/app/(ee)/api/cron/import/csv/route.ts
+++ b/apps/web/app/(ee)/api/cron/import/csv/route.ts
@@ -424,6 +424,7 @@ const processMappedLinks = async ({
await bulkCreateLinks({
links: validLinks as ProcessedLinkProps[],
+ skipRedisCache: true,
});
await redis.incrby(`${redisKey}:created`, validLinks.length);
diff --git a/apps/web/app/(ee)/api/cron/import/rebrandly/utils.ts b/apps/web/app/(ee)/api/cron/import/rebrandly/utils.ts
index 2cb8d86e47..1e1319a736 100644
--- a/apps/web/app/(ee)/api/cron/import/rebrandly/utils.ts
+++ b/apps/web/app/(ee)/api/cron/import/rebrandly/utils.ts
@@ -235,7 +235,10 @@ export const importLinksFromRebrandly = async ({
);
// bulk create links
- await bulkCreateLinks({ links: linksToCreate });
+ await bulkCreateLinks({
+ links: linksToCreate,
+ skipRedisCache: true,
+ });
count += importedLinks.length;
diff --git a/apps/web/app/(ee)/api/cron/import/short/utils.ts b/apps/web/app/(ee)/api/cron/import/short/utils.ts
index 0650718287..9853d78549 100644
--- a/apps/web/app/(ee)/api/cron/import/short/utils.ts
+++ b/apps/web/app/(ee)/api/cron/import/short/utils.ts
@@ -153,6 +153,7 @@ export const importLinksFromShort = async ({
}),
};
}),
+ skipRedisCache: true,
});
count += importedLinks.length;