mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-25 17:46:18 +00:00
find uncompleted builds only among last builds
This commit is contained in:
parent
9b7bb39d91
commit
812432b51c
9
app.js
9
app.js
@ -67,13 +67,14 @@ var completeUncompletedBuilds = function(callback) {
|
||||
function() {
|
||||
db.builds.find({
|
||||
start: {descCreateDate: ''},
|
||||
filter: function(build) {
|
||||
return !build.completed;
|
||||
},
|
||||
limit: 100
|
||||
}, this.slot());
|
||||
},
|
||||
function(err, uncompletedBuilds) {
|
||||
function(err, lastBuilds) {
|
||||
var uncompletedBuilds = _(lastBuilds).filter(function(lastBuild) {
|
||||
return !lastBuild.completed;
|
||||
});
|
||||
|
||||
var completeGroup = this.makeGroup();
|
||||
|
||||
if (uncompletedBuilds.length) {
|
||||
|
Loading…
Reference in New Issue
Block a user