错误输出:
[Error: ERR EXEC without MULTI]
节点脚本:
client = redis.createClient(REDIS_SOCK);
client.keys(['*'], function(err, keys) {
client.multi();
keys.forEach(function(key) {
count = start;
while(count <= end) {
client.zrangebyscore([key, count, count + 120000], function() {});
count += 120000;
}
});
client.exec(function(err, results) {
if(err) { console.log(err); }
else { console.log(results); }
client.quit();
});
});