includes/backup.js
function readBatchSetIdsFromLogFile(log, batchesPerDownloadSession, callback) {
  logfilesummary(log, function processSummary(err, summary) {
    if (!summary.changesComplete) {
      callback(new error.BackupError('IncompleteChangesInLogFile',
        'WARNING: Changes did not finish spooling'));
      return;
    }
    if (Object.keys(summary.batches).length === 0) {
      return callback(null, []);
    }

    // batch IDs are the property names of summary.batches
    var batchSetIds = getPropertyNames(summary.batches, batchesPerDownloadSession);
    callback(null, batchSetIds);
  });
}
function readBatchSetIdsFromLogFile(log, batchesPerDownloadSession, callback) {
  logfilesummary(log, function processSummary(err, summary) {
    if (!summary.changesComplete) {
      callback(new error.BackupError('IncompleteChangesInLogFile',
        'WARNING: Changes did not finish spooling'));
      return;
    }
    if (Object.keys(summary.batches).length === 0) {
      return callback(null, []);
    }

    // batch IDs are the property names of summary.batches
    var batchSetIds = getPropertyNames(summary.batches, batchesPerDownloadSession);
    callback(null, batchSetIds);
  });
}
function readBatchSetIdsFromLogFile ( log , batchesPerDownloadSession , callback ) { logfilesummary ( log , function processSummary ( err , summary ) { if ( ! summary . changesComplete ) { callback ( new error . BackupError ( 'IncompleteChangesInLogFile' , 'WARNING: Changes did not finish spooling' ) ) ; return ; } if ( Object . keys ( summary . batches ) . length === 0 ) { return callback ( null , [ ] ) ; } // batch IDs are the property names of summary.batches var batchSetIds = getPropertyNames ( summary . batches , batchesPerDownloadSession ) ; callback ( null , batchSetIds ) ; } ) ; }
Return a set of uncompleted download batch IDs from the log file.

@param {string} log - log file path
@param {number} batchesPerDownloadSession - maximum IDs to return
@param {function} callback - sign (err, batchSetIds array)
Return a set of uncompleted download batch IDs from the log file .