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..."); log.info("Updating system data...");
systemDataLoaderService.updateSystemWidgets(); systemDataLoaderService.updateSystemWidgets();
break; break;
case "3.3.0":
dataUpdateService.updateData("3.3.0");
default: default:
throw new RuntimeException("Unable to upgrade ThingsBoard, unsupported fromVersion: " + upgradeFromVersion); 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 ..."); log.info("Updating data from version 3.2.2 to 3.3.0 ...");
tenantsDefaultEdgeRuleChainUpdater.updateEntities(null); tenantsDefaultEdgeRuleChainUpdater.updateEntities(null);
tenantsAlarmsCustomerUpdater.updateEntities(null); tenantsAlarmsCustomerUpdater.updateEntities(null);
break;
case "3.3.0":
rateLimitsUpdater.updateEntities(null); rateLimitsUpdater.updateEntities(null);
break;
default: default:
throw new RuntimeException("Unable to update data, unsupported fromVersion: " + fromVersion); 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.setCassandraTenantLimitsConfiguration(cassandraTenantLimitsConfiguration);
profileConfiguration.setPrintTenantNames(printTenantNames); profileConfiguration.setPrintTenantNames(printTenantNames);
} }
tenantProfileService.saveTenantProfile(null, entity);
} }
} }
} }