This commit is contained in:
Barış Soner Uşaklı
2018-12-12 14:26:11 -05:00
parent 85a07e999b
commit d117df77f7
2 changed files with 23 additions and 10 deletions

View File

@@ -29,6 +29,9 @@ module.exports = function (redisClient, module) {
function sortedSetRange(method, key, start, stop, withScores, callback) {
if (Array.isArray(key)) {
if (!key.length) {
return setImmediate(callback, null, []);
}
const batch = redisClient.batch();
key.forEach((key) => {
batch[method]([key, start, stop, 'WITHSCORES']);