Comparing version
{ | ||
"name": "qjobs", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "qjobs is a simple and stupid queue job manager for nodejs", | ||
@@ -5,0 +5,0 @@ "main": "qjobs.js", |
@@ -25,2 +25,4 @@ var util = require('util'); | ||
this.aborting = false; | ||
if (options) { | ||
@@ -115,2 +117,6 @@ this.maxConcurrency = options.maxConcurrency || this.maxConcurrency; | ||
if (self.aborting) { | ||
this.jobsList = []; | ||
} | ||
// while queue is empty and number of job running | ||
@@ -228,3 +234,6 @@ // concurrently are less than max job running, | ||
qjob.prototype.abort = function() { | ||
this.aborting = true; | ||
} | ||
module.exports = qjob; |
@@ -88,3 +88,6 @@ [](http://travis-ci.org/franck34/qjobs) | ||
q.run(); | ||
//q.abort() will empty jobs list | ||
``` | ||
Sorry, the diff of this file is not supported yet
15886
10.9%11
10%476
14.42%93
3.33%