Skip to content

Commit

Permalink
Better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed May 10, 2022
1 parent 8c43c3e commit 28aed81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/cmd/regenerate-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ async function main() {
}
let processed = 0;
for (const entity of entities) {
console.log(`[${entity.mimeType}]: ${entity.id} (${processed+1}/${entities.length})`);
console.log(`[${entity.mimeType}] ${entity.id} (${processed+1}/${entities.length})`);
const beg = performance.now();
await shelf.regenerateEntityCache(entity);
++processed;
const end = performance.now();
console.log(`Done: ${((end-beg)/1000).toPrecision(2)}sec elapsed.`);
console.log(` -> Done: ${((end-beg)/1000).toPrecision(2)}sec elapsed.`);
}
} finally {
await repo.close();
Expand Down

0 comments on commit 28aed81

Please sign in to comment.