The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Shorten the sync ordering comments
Rafi9958e3181e5e
diff --git a/apps/web/scripts/customers/buffer/migrate-to-case-sensitive.ts b/apps/web/scripts/customers/buffer/migrate-to-case-sensitive.tsindex 5c5c1572bb..e285170182 100644--- a/apps/web/scripts/customers/buffer/migrate-to-case-sensitive.ts+++ b/apps/web/scripts/customers/buffer/migrate-to-case-sensitive.ts@@ -94,8 +94,7 @@ async function main() {});}- // Queue an index update for the owners of the links that changed key, ahead- // of the cache expiry below.+ // Queued before the cache expiry below.await queuePartnerSearchSyncForLinks(links);// expire the Redis cache for the links so it fetches the latest version from the databasediff --git a/apps/web/scripts/misc/restore-program-enrollments.ts b/apps/web/scripts/misc/restore-program-enrollments.tsindex 6a6de03d44..aedf8133af 100644--- a/apps/web/scripts/misc/restore-program-enrollments.ts+++ b/apps/web/scripts/misc/restore-program-enrollments.ts@@ -47,8 +47,7 @@ async function main() {});console.log(`Restored ${res.count} program enrollments`);- // Queued after the last write the document reads, and before the Tinybird and- // Stripe work, which must not be able to skip it.+ // Queued before the Tinybird and Stripe work below.const queueSearchSync = () =>queuePartnerSearchSync({enrollmentIds: programEnrollmentsToRestore.map(({ id }) => id),diff --git a/apps/web/scripts/partners/merge-partner-profile.ts b/apps/web/scripts/partners/merge-partner-profile.tsindex 11ad0680c5..5836d0c664 100644--- a/apps/web/scripts/partners/merge-partner-profile.ts+++ b/apps/web/scripts/partners/merge-partner-profile.ts@@ -61,8 +61,7 @@ async function main() {},});- // Queue an index update for the reassigned enrollment, ahead of the- // Tinybird write below.+ // Queued before the Tinybird write below.await queuePartnerSearchSync({ enrollmentIds: [programEnrollment.id] });const updatedLinks = await prisma.link.findMany({diff --git a/apps/web/scripts/partners/update-links.ts b/apps/web/scripts/partners/update-links.tsindex 07c08ae98f..e223e40fc7 100644--- a/apps/web/scripts/partners/update-links.ts+++ b/apps/web/scripts/partners/update-links.ts@@ -47,9 +47,8 @@ async function main() {}),);- // Queue an index update for the links that changed domain, ahead of the cache- // and Tinybird work below. The helper only reads programId and partnerId,- // which the move does not touch.+ // Queued before the cache and Tinybird work below. The helper reads only+ // programId and partnerId, which the move does not touch.await queuePartnerSearchSyncForLinks(links);const res = await Promise.all([