diff --git a/lib/distributor.js b/lib/distributor.js index ce0fab3..da449f2 100644 --- a/lib/distributor.js +++ b/lib/distributor.js @@ -68,6 +68,7 @@ Distributor.prototype._runNext = function(callback) { { endDate: Date.now(), status: err ? 'error' : 'done', + completed: true, error: err ? err.message : null }, function(err, build) { @@ -135,7 +136,8 @@ Distributor.prototype.run = function(project, params, callback) { project: project, params: params, createDate: Date.now(), - status: 'queued' + status: 'queued', + completed: false }, this.slot()); }, function(err, build) { diff --git a/static/js/app/stores/terminal.js b/static/js/app/stores/terminal.js index 577b481..1e9dbcc 100644 --- a/static/js/app/stores/terminal.js +++ b/static/js/app/stores/terminal.js @@ -30,7 +30,7 @@ define([ }; // create data resource for completed build - if (build.status === 'done' || build.status === 'error') { + if (build.completed) { connect.resource('projects') .sync('createBuildDataResource', function(err) { if (err) throw err;