MCPcopy
hub / github.com/strongloop/loopback / createSourceUpdates

Function createSourceUpdates

lib/persisted-model.js:1274–1292  ·  view source on GitHub ↗
(_diff, cb)

Source from the content-addressed store, hash-verified

1272 }
1273
1274 function createSourceUpdates(_diff, cb) {
1275 diff = _diff;
1276 diff.conflicts = diff.conflicts || [];
1277
1278 if (diff && diff.deltas && diff.deltas.length) {
1279 debug('\tbuilding a list of updates');
1280 utils.uploadInChunks(
1281 diff.deltas,
1282 replicationChunkSize,
1283 function(smallArray, chunkCallback) {
1284 return sourceModel.createUpdates(smallArray, chunkCallback);
1285 },
1286 cb,
1287 );
1288 } else {
1289 // nothing to replicate
1290 done();
1291 }
1292 }
1293
1294 function bulkUpdate(_updates, cb) {
1295 debug('\tstarting bulk update');

Callers

nothing calls this directly

Calls 1

doneFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…