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

Function done

lib/persisted-model.js:1339–1362  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

1337 }
1338
1339 function done(err) {
1340 if (err) return callback(err);
1341
1342 debug('\treplication finished');
1343 debug('\t\t%s conflict(s) detected', diff.conflicts.length);
1344 debug('\t\t%s change(s) applied', updates ? updates.length : 0);
1345 debug('\t\tnew checkpoints: { source: %j, target: %j }',
1346 newSourceCp, newTargetCp);
1347
1348 const conflicts = diff.conflicts.map(function(change) {
1349 return new Change.Conflict(
1350 change.modelId, sourceModel, targetModel,
1351 );
1352 });
1353
1354 if (conflicts.length) {
1355 sourceModel.emit('conflicts', conflicts);
1356 }
1357
1358 if (callback) {
1359 const newCheckpoints = {source: newSourceCp, target: newTargetCp};
1360 callback(null, conflicts, newCheckpoints, updates);
1361 }
1362 }
1363 }
1364
1365 /**

Callers 15

createSourceUpdatesFunction · 0.70
Gruntfile.jsFile · 0.50
countFunction · 0.50
change.test.jsFile · 0.50
email.test.jsFile · 0.50
registries.test.jsFile · 0.50
createTestingTokenFunction · 0.50
createTestAppFunction · 0.50

Calls

no outgoing calls

Tested by 15

countFunction · 0.40
createTestingTokenFunction · 0.40
createTestAppFunction · 0.40
setupServerFunction · 0.40
seedConflictFunction · 0.40
expectHttpErrorFunction · 0.40
setupSharedHttpServerFunction · 0.40
givenLoggedInUserFunction · 0.40
logoutFunction · 0.40
loginFunction · 0.40
verifyFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…