File: chat-websocket/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js

Recommend this page to a friend!
  Classes of Igor Escobar   Terminal Crossword   chat-websocket/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js   Download  
File: chat-websocket/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Terminal Crossword
Generate a crosswords board on a text console
Author: By
Last change:
Date: 2 years ago
Size: 699 bytes
 

Contents

Class file image Download
var redis = require("../index").createClient(null, null, { // max_attempts: 4 }); redis.on("error", function (err) { console.log("Redis says: " + err); }); redis.on("ready", function () { console.log("Redis ready."); }); redis.on("reconnecting", function (arg) { console.log("Redis reconnecting: " + JSON.stringify(arg)); }); redis.on("connect", function () { console.log("Redis connected."); }); setInterval(function () { var now = Date.now(); redis.set("now", now, function (err, res) { if (err) { console.log(now + " Redis reply error: " + err); } else { console.log(now + " Redis reply: " + res); } }); }, 100);