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:
Johannes Zellner
2020-06-14 13:35:28 +02:00
parent 1960969325
commit 01683e9383
2 changed files with 44 additions and 41 deletions
+1 -2
View File
@@ -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);