@Override
protected void executeTasks() throws Exception {
final BackendConnector bc = BackendConnector.getInstance();
final Application app = this.getApplicationContext();
if(bc.isAppExisting(this.getGoalContext(), app)) {
bc.cleanApp(this.getGoalContext(), app, this.getConfiguration().getConfiguration().getBoolean(CoreConfiguration.CLEAN_HISTORY, false));
if(this.getConfiguration().getConfiguration().getBoolean(CoreConfiguration.CLEAN_PURGE_VERSIONS, false))
bc.purgeAppVersions(this.getGoalContext(), app, this.getConfiguration().getConfiguration().getInt(CoreConfiguration.CLEAN_PURGE_KEEP_LAST, 3));
}
else {
log.info("App " + app + " does not exist in backend, thus, cleaning not possible");
this.skipGoalUpload();
}
}
}