var Queue = require('./queue');
var Job = require('./job');
var Worker = require('./worker');
var redis = require('./redis');

exports.redis = redis;

exports.createQueue = function(name, opts){
  if(!opts)
    opts = {};
  
  if(typeof opts.redis == 'undefined'){
    opts.redis = redis;
  }

  var q = new Queue(name, opts);
  return q;
};

exports.Job = Job;
exports.Worker = Worker;
var Queue = require('./queue');
var Job = require('./job');
var Worker = require('./worker');
var redis = require('./redis');

exports.redis = redis;

exports.createQueue = function(name){
  var q = new Queue(name);
  q.client = exports.redis.createClient();
  q.workerClient = exports.redis.createClient();
  return q;
};

exports.Job = Job;
exports.Worker = Worker;
--- 
+++ 
@@ -5,15 +5,10 @@
 
 exports.redis = redis;
 
-exports.createQueue = function(name, opts){
-  if(!opts)
-    opts = {};
-  
-  if(typeof opts.redis == 'undefined'){
-    opts.redis = redis;
-  }
-
-  var q = new Queue(name, opts);
+exports.createQueue = function(name){
+  var q = new Queue(name);
+  q.client = exports.redis.createClient();
+  q.workerClient = exports.redis.createClient();
   return q;
 };
 
Send redis library to queue via opts
