create data resource for completed build
This commit is contained in:
parent
2af6ddbfb1
commit
80fbc4e902
@ -16,6 +16,7 @@ define([
|
|||||||
output = '',
|
output = '',
|
||||||
resourceName = 'build' + build.id;
|
resourceName = 'build' + build.id;
|
||||||
|
|
||||||
|
var connectToBuildDataResource = function() {
|
||||||
connect.resource(resourceName).reconnect();
|
connect.resource(resourceName).reconnect();
|
||||||
connect.resource(resourceName).subscribe('data', function(data) {
|
connect.resource(resourceName).subscribe('data', function(data) {
|
||||||
output += data;
|
output += data;
|
||||||
@ -26,6 +27,18 @@ define([
|
|||||||
data: output
|
data: output
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// create data resource for completed build
|
||||||
|
if (build.status === 'done' || build.status === 'error') {
|
||||||
|
connect.resource('projects')
|
||||||
|
.sync('createBuildDataResource', function(err) {
|
||||||
|
if (err) throw err;
|
||||||
|
connectToBuildDataResource();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
connectToBuildDataResource();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user