better distributor queue processing

This commit is contained in:
oleg 2015-07-09 00:19:33 +03:00
parent 75799493c0
commit 355d3e5dea

View File

@ -50,12 +50,10 @@ Distributor.prototype._runNext = function(callback) {
});
// quit if we have no suitable project
if (queueItemIndex) {
if (queueItemIndex === -1) {
return callback();
}
this.pass(node);
var queueItem = self.queue.splice(queueItemIndex, 1)[0],
build = queueItem.build;