Ensure stopped apps are getting backed up

This commit is contained in:
Girish Ramakrishnan
2020-04-29 12:04:43 -07:00
parent efb39fb24b
commit 73d83ec57e
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -855,9 +855,10 @@ function backupBoxWithAppBackupIds(appBackupIds, tag, progressCallback, callback
}
function canBackupApp(app) {
// only backup apps that are installed or pending configure or called from apptask. Rest of them are in some
// state not good for consistent backup (i.e addons may not have been setup completely)
return (app.installationState === apps.ISTATE_INSTALLED && app.health === apps.HEALTH_HEALTHY) ||
// only backup apps that are installed or specific pending states
// we used to check the health here but that doesn't work for stopped apps. it's better to just fail
// and inform the user if the backup fails and the app addons have not been setup yet.
return app.installationState === apps.ISTATE_INSTALLED ||
app.installationState === apps.ISTATE_PENDING_CONFIGURE ||
app.installationState === apps.ISTATE_PENDING_BACKUP || // called from apptask
app.installationState === apps.ISTATE_PENDING_UPDATE; // called from apptask