Refactoring of versions to update, correct update of tenant profile

This commit is contained in:
AndrewVolosytnykhThingsboard 2021-06-02 10:55:07 +03:00
parent 1af249fcb4
commit d166353ce2
3 changed files with 3 additions and 4 deletions

View File

@ -203,8 +203,6 @@ public class ThingsboardInstallService {
log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets();
break;
case "3.3.0":
dataUpdateService.updateData("3.3.0");
default:
throw new RuntimeException("Unable to upgrade ThingsBoard, unsupported fromVersion: " + upgradeFromVersion);

View File

@ -110,9 +110,8 @@ public class DefaultDataUpdateService implements DataUpdateService {
log.info("Updating data from version 3.2.2 to 3.3.0 ...");
tenantsDefaultEdgeRuleChainUpdater.updateEntities(null);
tenantsAlarmsCustomerUpdater.updateEntities(null);
break;
case "3.3.0":
rateLimitsUpdater.updateEntities(null);
break;
default:
throw new RuntimeException("Unable to update data, unsupported fromVersion: " + fromVersion);
}

View File

@ -110,6 +110,8 @@ class RateLimitsUpdater extends PaginatedUpdater<String, TenantProfile> {
profileConfiguration.setCassandraTenantLimitsConfiguration(cassandraTenantLimitsConfiguration);
profileConfiguration.setPrintTenantNames(printTenantNames);
}
tenantProfileService.saveTenantProfile(null, entity);
}
}
}