minor improvement
This commit is contained in:
parent
7e96ba63df
commit
6983e41576
|
@ -65,8 +65,6 @@ 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,
|
||||||
|
@ -79,6 +77,8 @@ async function pdfScreenshotIndexing() {
|
||||||
orderBy: { id: "asc" },
|
orderBy: { id: "asc" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let counter = 0;
|
||||||
|
|
||||||
// PDFs
|
// PDFs
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.pdf`;
|
const path = `archives/${link.collectionId}/${link.id}.pdf`;
|
||||||
|
@ -92,11 +92,13 @@ async function pdfScreenshotIndexing() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(counter, "id:", link.id, "PDF");
|
console.log("count:", counter, "id:", link.id, "PDF");
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
// Screenshots (PNGs)
|
// Screenshots (PNGs)
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.png`;
|
const path = `archives/${link.collectionId}/${link.id}.png`;
|
||||||
|
@ -110,11 +112,13 @@ async function pdfScreenshotIndexing() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(counter, "id:", link.id, "PNG");
|
console.log("count:", counter, "id:", link.id, "PNG");
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
counter = 0;
|
||||||
|
|
||||||
// Screenshots (JPEGs)
|
// Screenshots (JPEGs)
|
||||||
for (let link of links) {
|
for (let link of links) {
|
||||||
const path = `archives/${link.collectionId}/${link.id}.jpeg`;
|
const path = `archives/${link.collectionId}/${link.id}.jpeg`;
|
||||||
|
@ -128,7 +132,7 @@ async function pdfScreenshotIndexing() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(counter, "id:", link.id, "JPEG");
|
console.log("count:", counter, "id:", link.id, "JPEG");
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
|
|
Ŝarĝante…
Reference in New Issue