[offers][chore] Add logging for seed analysis

pull/522/head
Bryann Yeap Kok Keong 2 years ago
parent 1dda831c54
commit 59c836c45d

@ -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()])

Loading…
Cancel
Save