src/tiler/healthCheck.js
/**
 * Attempts to connect to a Redis data store, providing the
 * callback with the error object.
 *
 * The error object is the second callback argument because
 * error objects in the first argument cause Step to short
 * circuit. In the case of a health check, we want all
 * errors.
 *
 * @param {string} host
 * @param {string} port
 * @param {function} callback
 */
Attempts to connect to a Redis data store, providing the
callback with the error object.

The error object is the second callback argument because
error objects in the first argument cause Step to short
circuit. In the case of a health check, we want all
errors.


Attempts to connect to a Redis data store providing the callback with the error object . The error object is the second callback argument because error objects in the first argument cause Step to short circuit . In the case of a health check we want all errors .
function checkRedis(host, port, callback) {
  var client = Redis.createClient(port, host);
  client.on('connect', function(err) {
    client.quit();
    callback(null, err);
  });
  client.on('error', function(err) {
    client.quit();
    callback(null, err);
  });
}
function checkRedis ( host , port , callback ) { var client = Redis . createClient ( port , host ) ; client . on ( 'connect' , function ( err ) { client . quit ( ) ; callback ( null , err ) ; } ) ; client . on ( 'error' , function ( err ) { client . quit ( ) ; callback ( null , err ) ; } ) ; }
Attempts to connect to a Redis data store, providing the
 callback with the error object.
Attempts to connect to a Redis data store providing the callback with the error object .