Skip to content

Commit

Permalink
Merge pull request #1785 from CodeNow/remove-build-log-polling
Browse files Browse the repository at this point in the history
Remove hack-fix for build logs
  • Loading branch information
Nathan219 authored Sep 22, 2016
2 parents fffa377 + b04cf3d commit 3a4947b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions client/directives/components/buildLogs/buildLogsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ function BuildLogsController(
$scope,
$rootScope,
$timeout,
ahaGuide,
errs,
keypather,
launchDebugContainer,
loading,
updateInstanceWithNewBuild,
Expand Down Expand Up @@ -60,25 +58,9 @@ function BuildLogsController(
if (oldStream) {
closeStream(oldStream);
}
var pollingCount = 10;
function pollForCv() {
promisify(BLC.instance, 'fetch')()
.then(function (instance) {
keypather.set($scope, 'BLC.instance', instance);
})
.finally(function () {
pollingCount--;
if (pollingCount > 0 && !keypather.get($scope, 'BLC.instance.attrs.contextVersion.build.dockerContainer')) {
$timeout(pollForCv, 1000);
}
});
}
BLC.streamFailure = false;
var stream = null;
if (BLC.instance) {
if (ahaGuide.isInGuide()) {
$timeout(pollForCv, 1000);
}
BLC.buildStatus = 'starting';
BLC.buildLogs = [];
BLC.buildLogTiming = {};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
],
"dependencies": {
"101": "0.14.1",
"@runnable/api-client": "v9.2.1",
"@runnable/api-client": "v9.2.2",
"angular": "1.3.15",
"angular-animate": "1.3.15",
"angular-clipboard": "1.4.x",
Expand Down

0 comments on commit 3a4947b

Please sign in to comment.