Another attempt to fix app polling
Using taskId only to update app info leads to various outdated states if an app task has finished. We need to also update once the task has finished at least once. So instead of individual app polling, we can simply rely on the all apps listing api, which we poll anyways and not rely on the restricted properties in the main apps view. The app configure will fetch the updated full properties now, not relying on the Clients internal caching
This commit is contained in:
+1
-2
@@ -1084,7 +1084,6 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
Client.error(error);
|
||||
} else {
|
||||
$('#uninstallModal').modal('hide');
|
||||
Client.refreshAppCache($scope.app.id, function() {}); // reflect the new app state immediately
|
||||
$location.path('/apps');
|
||||
}
|
||||
|
||||
@@ -1469,7 +1468,7 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
function refreshApp(appId, callback) {
|
||||
callback = callback || function () {};
|
||||
|
||||
Client.refreshAppCache(appId, function (error, app) {
|
||||
Client.getAppWithTask(appId, function (error, app) {
|
||||
if (error && error.statusCode === 404) return $location.path('/apps');
|
||||
if (error) return callback(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user