Skip to content

Commit

Permalink
Handling issues with Kue connection failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
reydelamirienda committed Aug 7, 2013
1 parent 58b7f47 commit ae0c408
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions kue.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

var kue = require('kue')
, logger = require('winston')
, redis = require('redis');

/*
Expand All @@ -19,6 +20,12 @@ Plugin.attach = function(config) {

kue.redis.createClient = function() {
var client = redis.createClient(config.port, config.host);
client.on('error', function(error) {
logger.error("Error in connection to KUE Redis");
});
client.on('connect', function() {
logger.info("Connection to KUE Redis server open");
})
if (config.auth) {
client.auth(config.auth);
}
Expand Down

0 comments on commit ae0c408

Please sign in to comment.