Closed sam-github closed 9 years ago
Replaces https://github.com/strongloop/strong-arc/pull/1566
@seanbrookes I didn't want to overwrite your PR, it might mess you up, but I rebased it and rewrote the commit message to reflect current behaviour.
This PR is completely identical to #1566, except for this difference:
diff --git a/client/www/scripts/modules/tracing/tracing.controllers.js b/client/www/scripts/modules/tracing/tracing.controllers.js
index b474b21..e9349e5 100644
--- a/client/www/scripts/modules/tracing/tracing.controllers.js
+++ b/client/www/scripts/modules/tracing/tracing.controllers.js
@@ -248,12 +248,12 @@ Tracing.controller('TracingMainController', [
$log.warn('bad pm reload', err);
return;
}
- var targetProcessCount = instance.setSize;
- if (targetProcessCount > 0) {
+ $scope.targetProcessCount = instance.setSize;
+ if ($scope.targetProcessCount > 0) {
$scope.startTicker();
// processes are still coming up
var fpLen = filteredProcesses.length;
- if (fpLen !== targetProcessCount) {
+ if (fpLen !== $scope.targetProcessCount) {
if (!restarting) {
if (prevTracingPidCount !== fpLen) {
// show progress via growl each time the process count changes
This fixes a bug where the progress string "X of N process restarted" (or somesuch) has the wrong N
value if it is changed while the cluster is restarting. It does this by updating the global var to always be as current as possible.
I suggest merging this, and closing #1566.
Closing, sean pulled the changes into his branch.
Is not safe to assume setSize is constant while polling the processes.