Skip to content

Commit

Permalink
AMBARI-13444. Add a constant poller for admin web (rzang)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zangr committed Oct 16, 2015
1 parent f6ff71b commit c908531
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,19 @@ angular.module('ambariAdminConsole')
$rootScope.userActivityTimeoutInterval = window.setInterval(checkActiveness, 1000);
};

// Send noop requests every 10 seconds just to keep backend session alive
$scope.startNoopPolling = function() {
$rootScope.noopPollingInterval = setInterval(Cluster.getAmbariTimeout, 10000);
};

if (!$rootScope.userActivityTimeoutInterval) {
Cluster.getAmbariTimeout().then(function(timeout) {
if (Number(timeout) > 0)
$scope.startInactiveTimeoutMonitoring(timeout * 1000);
});
}
if (!$rootScope.noopPollingInterval) {
$scope.startNoopPolling();
}
$scope.updateInstances();
}]);

0 comments on commit c908531

Please sign in to comment.