(_diff, cb)
| 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'); |
nothing calls this directly
no test coverage detected
searching dependent graphs…