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
3
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 2.0.3 to 2.0.4

20

lib/queue.js

@@ -166,10 +166,14 @@ var util = require('util');

started++;
self.connection.redis.lrem(key, 0, search, function(){
self.connection.redis.srem(self.connection.key("timestamps:" + search), key, function(){
timestamps.push(key.split(":")[key.split(":").length - 1]);
started--;
if(started === 0){
if(typeof callback === 'function'){ callback(err, timestamps); }
}
});
self.connection.redis.lrem(self.connection.key(key), 0, search, function(err, count){
if(count > 0) {
self.connection.redis.srem(self.connection.key("timestamps:" + search), key, function(){
timestamps.push(key.split(":")[key.split(":").length - 1]);
started--;
if(started === 0){
if(typeof callback === 'function'){ callback(err, timestamps); }
}
});
} else {
if(typeof callback === 'function'){ callback(err, []); }
}
});

@@ -176,0 +180,0 @@ });

2

package.json

@@ -6,3 +6,3 @@ {

"license": "Apache-2.0",
"version": "2.0.3",
"version": "2.0.4",
"homepage": "http://github.com/taskrabbit/node-resque",

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

@@ -175,2 +175,15 @@ var specHelper = require(__dirname + "/../_specHelper.js").specHelper;

it('can delete a delayed job, and delayed queue should be empty', function(done){
queue.enqueueAt(10000, specHelper.queue, 'someJob', [1,2,3], function(){
queue.delDelayed(specHelper.queue, 'someJob', [1,2,3], function(err, timestamps){
queue.allDelayed(function(err, hash){
hash.should.be.empty();
timestamps.length.should.equal(1);
timestamps[0].should.equal('10');
done();
});
});
});
});
it('can handle single arguments without explicit array', function(done){

@@ -251,7 +264,8 @@ queue.enqueue(specHelper.queue, 'someJob', 1, function(){

Object.keys(hash).length.should.equal(2);
queue.delDelayed(specHelper.queue, 'noParams');
queue.delDelayed(specHelper.queue, 'noParams', function(){
queue.allDelayed(function(err, hash){
hash.should.be.empty;
done();
queue.delDelayed(specHelper.queue, 'noParams', function(){
queue.allDelayed(function(err, hash){
hash.should.be.empty;
done();
});
});

@@ -258,0 +272,0 @@ });

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