diff --git a/apps/portal/prisma/seed-analysis.ts b/apps/portal/prisma/seed-analysis.ts index 929443dc..74d96822 100644 --- a/apps/portal/prisma/seed-analysis.ts +++ b/apps/portal/prisma/seed-analysis.ts @@ -14,13 +14,26 @@ const seedAnalysis = async () => { }, }); - for (const profile of profilesWithoutAnalysis) { + console.log( + 'Number of profiles found without analysis:', + profilesWithoutAnalysis.length, + ); + + let i = 0; + + while (i < profilesWithoutAnalysis.length) { + const profile = profilesWithoutAnalysis[i]; await generateAnalysis({ ctx: { prisma, session: null }, input: { profileId: profile.id }, }); - console.log('Analysis generated for profile with id:', profile.id); + + i++; + + console.log(i, ': Analysis generated for profile with id', profile.id); } + + console.log(i, ' analysis generated'); }; Promise.all([seedAnalysis()])