Use done
to match JavaScript iterators
See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators
This commit is contained in:
parent
a4f0c5242f
commit
442f5d7295
2 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@
|
||||||
});
|
});
|
||||||
console.log('Upgrade message schema:', results);
|
console.log('Upgrade message schema:', results);
|
||||||
|
|
||||||
if (!results.hasMore) {
|
if (!results.done) {
|
||||||
idleDetector.stop();
|
idleDetector.stop();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -70,9 +70,9 @@ exports.processNext = async ({
|
||||||
|
|
||||||
const totalDuration = Date.now() - startTime;
|
const totalDuration = Date.now() - startTime;
|
||||||
const numProcessed = messagesRequiringSchemaUpgrade.length;
|
const numProcessed = messagesRequiringSchemaUpgrade.length;
|
||||||
const hasMore = numProcessed > 0;
|
const done = numProcessed > 0;
|
||||||
return {
|
return {
|
||||||
hasMore,
|
done,
|
||||||
numProcessed,
|
numProcessed,
|
||||||
fetchDuration,
|
fetchDuration,
|
||||||
upgradeDuration,
|
upgradeDuration,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue