The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update backfill-workspace-groups-limit.ts
Kiran K83c9dcb5b58e
diff --git a/apps/web/scripts/partners/backfill-workspace-groups-limit.ts b/apps/web/scripts/partners/backfill-workspace-groups-limit.tsindex b12ceee0bb..cf4f11f767 100644--- a/apps/web/scripts/partners/backfill-workspace-groups-limit.ts+++ b/apps/web/scripts/partners/backfill-workspace-groups-limit.ts@@ -27,22 +27,20 @@ async function main() {console.table(workspaces);console.log(`Found ${workspaces.length} workspaces to update.`);- for (const workspace of workspaces) {- const plan = getCurrentPlan(workspace.plan);+ await Promise.allSettled(+ workspaces.map((workspace) => {+ const plan = getCurrentPlan(workspace.plan);- await prisma.project.update({- where: {- id: workspace.id,- },- data: {- groupsLimit: plan.limits.groups!,- },- });-- console.log(- `Updated ${workspace.slug} groups limit to ${plan.limits.groups}`,- );- }+ return prisma.project.update({+ where: {+ id: workspace.id,+ },+ data: {+ groupsLimit: plan.limits.groups!,+ },+ });+ }),+ );}main();