log when finished
This commit is contained in:
parent
7f00bace29
commit
af29002d5d
1 changed files with 24 additions and 14 deletions
|
@ -23,7 +23,10 @@ export default async function indexAllNotes(
|
|||
|
||||
if (scyllaClient) {
|
||||
total = await fetchPostCount(false);
|
||||
scyllaClient.eachRow("SELECT * FROM note", [], (n, row) => {
|
||||
scyllaClient.eachRow(
|
||||
"SELECT * FROM note",
|
||||
[],
|
||||
(n, row) => {
|
||||
if (n % 1000 === 0) {
|
||||
job.progress(((n / total) * 100).toFixed(1));
|
||||
logger.info(`Indexed notes ${n}/${total}`);
|
||||
|
@ -34,10 +37,17 @@ export default async function indexAllNotes(
|
|||
} else {
|
||||
index(note, true);
|
||||
}
|
||||
});
|
||||
|
||||
done();
|
||||
},
|
||||
(err, _) => {
|
||||
if (err.message) {
|
||||
logger.error(err);
|
||||
} else {
|
||||
logger.info("All notes have been indexed.");
|
||||
}
|
||||
done();
|
||||
},
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue