mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-02-13 23:56:22 +08:00
[offers][chore] Add logging for seed analysis
This commit is contained in:
@@ -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()])
|
||||
|
||||
Reference in New Issue
Block a user