MCPcopy Index your code
hub / github.com/apache/pouchdb / startNextBatch

Function startNextBatch

lib/index.js:9961–9979  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9959 }
9960
9961 function startNextBatch() {
9962 if (returnValue.cancelled || currentBatch) {
9963 return;
9964 }
9965 if (batches.length === 0) {
9966 processPendingBatch(true);
9967 return;
9968 }
9969 currentBatch = batches.shift();
9970 returnValue.emit('checkpoint', { 'start_next_batch': currentBatch.seq });
9971 getDiffs()
9972 .then(getBatchDocs)
9973 .then(writeDocs)
9974 .then(finishBatch)
9975 .then(startNextBatch)
9976 .catch(function (err) {
9977 abortReplication('batch processing terminated with error', err);
9978 });
9979 }
9980
9981
9982 function processPendingBatch(immediate) {

Callers 1

processPendingBatchFunction · 0.70

Calls 3

processPendingBatchFunction · 0.70
getDiffsFunction · 0.70
abortReplicationFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…