Added revalidate_policy config.

This allows resources to be validated prior to every app launch instead of just
after update.

Also fixed some erroneous logging.
This commit is contained in:
Michael Bayne
2019-05-29 11:40:36 -07:00
parent a4cef568b1
commit 9d6088ab80
4 changed files with 40 additions and 19 deletions
@@ -129,7 +129,7 @@ public abstract class Getdown
{
if (SysProps.noInstall()) {
log.info("Skipping install due to 'no_install' sysprop.");
} else if (_readyToInstall) {
} else if (isUpdateAvailable()) {
log.info("Installing " + _toInstallResources.size() + " downloaded resources:");
for (Resource resource : _toInstallResources) {
resource.install(true);
@@ -260,13 +260,15 @@ public abstract class Getdown
}
}
try {
download(predownloads);
for (Resource rsrc : predownloads) {
rsrc.install(false); // install but don't validate yet
if (!predownloads.isEmpty()) {
try {
download(predownloads);
for (Resource rsrc : predownloads) {
rsrc.install(false); // install but don't validate yet
}
} catch (IOException ioe) {
log.warning("Failed to predownload resources. Continuing...", ioe);
}
} catch (IOException ioe) {
log.warning("Failed to predownload resources. Continuing...", ioe);
}
}