minor improvement
This commit is contained in:
parent
af7f0fb47c
commit
7e96ba63df
|
@ -65,6 +65,8 @@ async function checkFileExistence(path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function pdfScreenshotIndexing() {
|
async function pdfScreenshotIndexing() {
|
||||||
|
let counter = 0;
|
||||||
|
|
||||||
const links = await prisma.link.findMany({
|
const links = await prisma.link.findMany({
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
@ -88,10 +90,11 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { pdf: path },
|
data: { pdf: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(counter, "id:", link.id, "PDF");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screenshots (PNGs)
|
// Screenshots (PNGs)
|
||||||
|
@ -105,10 +108,11 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { image: path },
|
data: { image: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(counter, "id:", link.id, "PNG");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screenshots (JPEGs)
|
// Screenshots (JPEGs)
|
||||||
|
@ -122,10 +126,11 @@ async function pdfScreenshotIndexing() {
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { image: path },
|
data: { image: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
|
||||||
} else {
|
|
||||||
console.log(`${link.id}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(counter, "id:", link.id, "JPEG");
|
||||||
|
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
await prisma.$disconnect();
|
await prisma.$disconnect();
|
||||||
|
|
Ŝarĝante…
Reference in New Issue