|
|
@ -23,6 +23,11 @@ var async = require('async'),
|
|
|
|
return callback(new Error('[[error:process-not-a-function]]'));
|
|
|
|
return callback(new Error('[[error:process-not-a-function]]'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// use the fast path if possible
|
|
|
|
|
|
|
|
if (db.processSortedSet && typeof options.doneIf !== 'function' && !utils.isNumber(options.alwaysStartAt)) {
|
|
|
|
|
|
|
|
return db.processSortedSet(setKey, process, options.batch || DEFAULT_BATCH_SIZE, callback);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// custom done condition
|
|
|
|
// custom done condition
|
|
|
|
options.doneIf = typeof options.doneIf === 'function' ? options.doneIf : function(){};
|
|
|
|
options.doneIf = typeof options.doneIf === 'function' ? options.doneIf : function(){};
|
|
|
|
|
|
|
|
|
|
|
@ -58,4 +63,4 @@ var async = require('async'),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}(exports));
|
|
|
|
}(exports));
|
|
|
|