i am trying to get length of a list "Device_Live". For each of device (ex. 'qwerty1' , 'qwerty2' , 'qwerty3' ..) saved in Device_Live list I want to add them as separate list and save coordinate for them and i am getting the error. "Error: Error: Redis connection gone from close event".
redisClient.llen("Device_Live", function (errorMessage, activeDevicCount) {
for (var deviceCount = 0; deviceCount < activeDevicCount; deviceCount++) {
redisClient.lindex("Device_Live", deviceCount, function (errorMessage, deviceName) {
for (var deviceCoordinate = 0; deviceCoordinate < resultData.length; deviceCoordinate++) {
redisClient.lpush(deviceName, resultData[deviceCoordinate], redisInitialise.print);
}
});
}
});