Permalink
Browse files

Fixed a silly regression bug in redisutil

  • Loading branch information...
1 parent 6a31539 commit 4ec19882869890d64ae00b0ed7fc339536e80b2e @safwank committed Aug 26, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 common/redisutil.js
View
@@ -1,12 +1,13 @@
var redis, redisClient;
if (process.env.REDISTOGO_URL) {
- var rtg = require('url').parse(process.env.REDISTOGO_URL);
- redisClient = require('redis').createClient(rtg.port, rtg.hostname);
+ redis = require('url').parse(process.env.REDISTOGO_URL);
+ redisClient = require('redis').createClient(redis.port, redis.hostname);
- redisClient.auth(rtg.auth.split(':')[1]);
+ redisClient.auth(redis.auth.split(':')[1]);
} else {
- redisClient = require('redis').createClient();
+ redis = require('redis');
+ redisClient = redis.createClient();
}
var TOTAL_NODES_KEY = 'total_nodes_imported';

0 comments on commit 4ec1988

Please sign in to comment.