redisClient.on("error",function(err){
report('RedisError');
logger.error("Error "+ err);});var client = redis.createClient({
retry_strategy:function(options){if(options.error.code ==='ECONNREFUSED'){// End reconnecting on a specific error and flush all commands with a individual error
report('连接被拒绝');}if(options.times_connected >10){
report('重试连接超过十次');}// reconnect after returnMath.max(options.attempt *100,3000);}});