stream-slice: fix logging

This commit is contained in:
Starbeamrainbowlabs 2020-07-02 17:26:45 +01:00
parent 4887e5288d
commit 97ab77e95e
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
1 changed files with 3 additions and 3 deletions

View File

@ -42,11 +42,11 @@ export default async function(settings) {
let is_last = i - offset >= count - 1;
await next.serialise(stream_out, is_last);
// Update the user
l.log(`Written ${(i - offset) + 1} / ${count} objects (~${percentage(i - offset, count).toFixed(2)}%)`);
// Don't go further than we need to
if(is_last) break;
// Update the user
l.log(`Written ${i - offset} / count objects (~${percentage(i - offset, count).toFixed(2)}%)`);
}
l.log(`Slicing complete`);