Allow new "withScores" option in batch.processSortedSet (#6602)

This commit is contained in:
Julian Lam
2018-06-22 16:28:25 -04:00
committed by Barış Soner Uşaklı
parent 6ae5d7ccae
commit df8c22e9c7

View File

@@ -51,7 +51,7 @@ exports.processSortedSet = function (setKey, process, options, callback) {
function (next) { function (next) {
async.waterfall([ async.waterfall([
function (next) { function (next) {
db.getSortedSetRange(setKey, start, stop, next); db['getSortedSetRange' + (options.withScores ? 'WithScores' : '')](setKey, start, stop, next);
}, },
function (ids, _next) { function (ids, _next) {
if (!ids.length || options.doneIf(start, stop, ids)) { if (!ids.length || options.doneIf(start, stop, ids)) {