better-queue
Advanced tools
Comparing version 3.7.20 to 3.7.21
@@ -33,3 +33,3 @@ var uuid = require('node-uuid'); | ||
self.precondition = opts.precondition || function (cb) { cb(null, true) }; | ||
self.id = opts.id || false; | ||
self.id = opts.id || 'id'; | ||
self.priority = opts.priority || null; | ||
@@ -36,0 +36,0 @@ |
{ | ||
"name": "better-queue", | ||
"version": "3.7.20", | ||
"version": "3.7.21", | ||
"description": "Better Queue for NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "lib/queue.js", |
@@ -93,6 +93,6 @@ # Better Queue - Powerful flow control | ||
q.push(1) | ||
.on('done', function (result) { | ||
.on('finish', function (result) { | ||
// Task succeeded with {result}! | ||
}) | ||
.on('fail', function (err) { | ||
.on('failed', function (err) { | ||
// Task failed! | ||
@@ -99,0 +99,0 @@ }) |
@@ -335,3 +335,3 @@ var assert = require('assert'); | ||
it('drain should still work with persistent queues', function (done) { | ||
var initialQueue = new Queue(function (n, cb) { | ||
var q = new Queue(function (n, cb) { | ||
setTimeout(cb, 1); | ||
@@ -346,13 +346,8 @@ }, { | ||
var drained = false; | ||
initialQueue.on('drain', function () { | ||
q.on('drain', function () { | ||
drained = true; | ||
done(); | ||
}); | ||
initialQueue.push(1); | ||
setTimeout(function () { | ||
initialQueue.destroy(); | ||
assert.ok(drained); | ||
done(); | ||
}, 20) | ||
q.push(1); | ||
this.q = q; | ||
}) | ||
@@ -359,0 +354,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96238
25
2511