Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-resque

Package Overview
Dependencies
Maintainers
1
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.3.2 to 0.3.3

examples/errorExample.js

6

lib/plugins/queueLock.js

@@ -86,7 +86,3 @@ // If a job with the same name, queue, and args is already in the queue, do not enqueue it again

}else{
try{
var flattenedArgs = self.args.join("-");
}catch(e){
var flattenedArgs = JSON.stringify(self.args);
}
var flattenedArgs = JSON.stringify(self.args);
return self.worker.connection.key('lock', self.func, self.queue, flattenedArgs);

@@ -93,0 +89,0 @@ }

@@ -126,7 +126,8 @@ var os = require("os");

d.run(function(){
try{
if (self.jobs[job["class"]] == null){ throw new Error("No job defined for class '"+job["class"]+"'") }
if (self.jobs[job["class"]] == null){
throw new Error("No job defined for class '"+job["class"]+"'")
}else{
var cb = self.jobs[job["class"]]["perform"];
self.emit('job', self.queue, job);
if (cb != null) {
if(cb != null) {
self.working = true;

@@ -151,7 +152,5 @@ self.job = job;

});
} else {
self.completeJob(null, new Error("Missing Job: " + job["class"]), callback);
}else{
self.completeJob(new Error("Missing Job: " + job["class"]), null, callback);
}
}catch(err){
d.emit('error', err);
}

@@ -168,3 +167,3 @@ });

self.fail(err, job);
}else if(result != null){
}else{
self.succeed(result, job);

@@ -171,0 +170,0 @@ }

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

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

@@ -25,4 +25,4 @@ "repository": {

"scripts": {
"test": "./node_modules/.bin/mocha --reporter spec"
"test": "mocha"
}
}

@@ -35,11 +35,13 @@ var redis = require('redis');

var self = this;
self.redis.keys(self.namespace + "*", function(err, keys){
if(keys.length == 0){
callback();
}else{
self.redis.del(keys, function(){
callback();
});
}
});
setTimeout(function(){
self.redis.keys(self.namespace + "*", function(err, keys){
if(keys.length == 0){
callback();
}else{
self.redis.del(keys, function(){
callback();
});
}
});
}, 200);
},

@@ -46,0 +48,0 @@ startAll: function(jobs, callback){

Sorry, the diff of this file is not supported yet

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