node-resque
Advanced tools
Comparing version 0.5.4 to 0.6.0
@@ -13,2 +13,3 @@ ///////////////////////// | ||
var connectionDetails = { | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -15,0 +16,0 @@ password: "", |
@@ -13,2 +13,3 @@ ///////////////////////// | ||
var connectionDetails = { | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -15,0 +16,0 @@ password: "", |
@@ -13,2 +13,3 @@ ///////////////////////// | ||
var connectionDetails = { | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -15,0 +16,0 @@ password: "", |
@@ -13,2 +13,3 @@ ///////////////////////// | ||
var connectionDetails = { | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -15,0 +16,0 @@ password: "", |
@@ -25,3 +25,3 @@ var connection = function(options){ | ||
return { | ||
package: require("redis"), | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -37,3 +37,3 @@ password: "", | ||
var self = this; | ||
if(self.options.fake === true){ | ||
if(self.options.package === 'fakeredis'){ | ||
callack(); | ||
@@ -55,3 +55,4 @@ }else if(self.connected === false){ | ||
var options = self.options; | ||
self.redis = options.redis || options.package.createClient(options.port, options.host, options.options); | ||
var package = require(self.options.package) | ||
self.redis = options.redis || package.createClient(options.port, options.host, options.options); | ||
@@ -74,3 +75,3 @@ self.redis.on('error', function(err){ | ||
}); | ||
}else if(options.fake != true){ | ||
}else if(self.options.package != 'fakeredis'){ | ||
self.redis.select(options.database, function(err){ | ||
@@ -77,0 +78,0 @@ self.redis.info(function(err, data){ |
@@ -57,3 +57,5 @@ // TODO: Locking like ruby does | ||
self.emit('end'); | ||
callback(); | ||
process.nextTick(function(){ | ||
if(typeof callback === 'function'){ callback(); } | ||
}); | ||
}else if(self.processing == true){ | ||
@@ -60,0 +62,0 @@ setTimeout(function(){ |
@@ -5,3 +5,3 @@ { | ||
"description": "an opinionated implementation of resque in node", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"homepage": "http://github.com/taskrabbit/node-resque", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -117,2 +117,3 @@ # node-resque | ||
var connectionDetails = { | ||
package: "redis", | ||
host: "127.0.0.1", | ||
@@ -119,0 +120,0 @@ password: "", |
@@ -6,7 +6,7 @@ var redis = require('redis'); | ||
var toFakeredis = true; | ||
if(process.env.fakeredis == 'false'){ toFakeredis = false; } | ||
var package = 'redis'; | ||
if(process.env.fakeredis == 'true'){ package = 'fakeredis'; } | ||
exports.specHelper = { | ||
toFakeredis: toFakeredis, | ||
package: package, | ||
NR: require(__dirname + "/../index.js"), | ||
@@ -17,3 +17,3 @@ namespace: namespace, | ||
connectionDetails: { | ||
fake: toFakeredis, | ||
package: package, | ||
host: "127.0.0.1", | ||
@@ -28,3 +28,3 @@ password: "", | ||
var self = this; | ||
if(toFakeredis != true){ | ||
if(package != 'fakeredis'){ | ||
self.redis = redis.createClient(self.connectionDetails.port, self.connectionDetails.host, self.connectionDetails.options); | ||
@@ -31,0 +31,0 @@ if(self.connectionDetails.password != null && self.connectionDetails.password != ""){ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
82875
2094
251
28