New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-resque

Package Overview
Dependencies
Maintainers
2
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-resque - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

40

lib/connection.js

@@ -16,3 +16,3 @@ var connection = function(options){

self.connected = true;
options.redis.get('test_key', function(err){
options.redis.get('key', function(err, data){
if(err){ self.connected = false; }

@@ -58,30 +58,34 @@ })

self.redis.on('error', function(err){
if(self.connected === false){
callback(err);
}
// catch to prevent bubble up of error
});
self.redis.on('connect', function(){
if(options.database != null){ self.redis.select(options.database); }
self.connected = true;
if(options.password != null && options.password != "" && self.options.fake != true){
self.redis.auth(options.password, function(err){
self.redis.select(options.database, function(err){
callback(err);
});
});
}else if(self.options.package != 'fakeredis'){
self.redis.select(options.database, function(err){
self.redis.info(function(err, data){
callback(err);
});
});
}
});
self.redis.on('end', function(){
self.connected = false;
});
if(options.password != null && options.password != "" && self.options.fake != true){
self.redis.auth(options.password, function(err){
self.redis.select(options.database, function(err){
callback(err);
});
});
}else if(self.options.package != 'fakeredis'){
self.redis.select(options.database, function(err){
self.redis.info(function(err, data){
callback(err);
});
});
}else{
// fakeredis cannot use the 'info' command; but you can assume you are connected
if(self.options.package === 'fakeredis' || self.options.redis != null){
if(options.database != null){ self.redis.select(options.database); }
process.nextTick(function(){
callback();
})
});
}

@@ -88,0 +92,0 @@ }

@@ -5,3 +5,3 @@ {

"description": "an opinionated implementation of resque in node",
"version": "0.8.0",
"version": "0.8.1",
"homepage": "http://github.com/taskrabbit/node-resque",

@@ -8,0 +8,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc