fix redis union

v1.18.x
barisusakli
parent b71ab64cf4
commit e1253f693a

@ -29,7 +29,7 @@ module.exports = function (redisClient, module) {
function sortedSetRange(method, key, start, stop, withScores, callback) { function sortedSetRange(method, key, start, stop, withScores, callback) {
if (Array.isArray(key)) { if (Array.isArray(key)) {
return sortedSetUnion({method: method, sets: key, start: start, stop: stop, withScores: withScores}, callback); return module.sortedSetUnion({method: method, sets: key, start: start, stop: stop, withScores: withScores}, callback);
} }
var params = [key, start, stop]; var params = [key, start, stop];

@ -21,15 +21,15 @@ module.exports = function (redisClient, module) {
module.getSortedSetUnion = function (params, callback) { module.getSortedSetUnion = function (params, callback) {
params.method = 'zrange'; params.method = 'zrange';
sortedSetUnion(params, callback); module.sortedSetUnion(params, callback);
}; };
module.getSortedSetRevUnion = function (params, callback) { module.getSortedSetRevUnion = function (params, callback) {
params.method = 'zrevrange'; params.method = 'zrevrange';
sortedSetUnion(params, callback); module.sortedSetUnion(params, callback);
}; };
function sortedSetUnion(params, callback) { module.sortedSetUnion = function (params, callback) {
var tempSetName = 'temp_' + Date.now(); var tempSetName = 'temp_' + Date.now();
@ -56,5 +56,5 @@ module.exports = function (redisClient, module) {
} }
callback(null, objects); callback(null, objects);
}); });
} };
}; };
Loading…
Cancel
Save