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

better-queue

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

better-queue - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

20

lib/worker.js

@@ -66,10 +66,14 @@

}
self._process = self.fn.call(self, tasks, function (err, result) {
if (!self.active) return;
if (err) {
self.failedBatch(err.message || err);
} else {
self.finishBatch(result);
}
});
try {
self._process = self.fn.call(self, tasks, function (err, result) {
if (!self.active) return;
if (err) {
self.failedBatch(err.message || err);
} else {
self.finishBatch(result);
}
})
} catch (err) {
self.failedBatch(err.message || err);
}
self._process = self._process || {};

@@ -76,0 +80,0 @@ }

2

package.json
{
"name": "better-queue",
"version": "2.1.0",
"version": "2.1.1",
"description": "Better Queue for NodeJS",

@@ -5,0 +5,0 @@ "main": "lib/queue.js",

@@ -19,2 +19,13 @@ var assert = require('assert');

it('should catch thrown errors', function (done) {
var q = new Queue(function (n, cb) {
throw new Error("failed");
})
q.on('task_failed', function (taskId, msg) {
assert.equal(msg, "failed");
done();
})
q.push(1)
});
it('should fail', function (done) {

@@ -21,0 +32,0 @@ var q = new Queue(function (n, cb) {

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