Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
kuangxiang20240501 committed Nov 12, 2024
1 parent f6abfd3 commit 564dfaa
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -429,20 +429,13 @@ private void updateSystemStatus(UnifiedAssetEntity templateDeployment) {
templateDeployment.getLabels().getOrDefault(LABEL_APP_TEMPLATE_UPGRADE_ID, "");
UnifiedAssetDto templateUpgrade = unifiedAssetService.findOne(templateUpgradeId);
String envName = templateDeployment.getLabels().get(LABEL_ENV_NAME);
String version = templateUpgrade.getMetadata().getLabels().get(LABEL_PRODUCT_VERSION);
if (EnvNameEnum.STAGE.name().equalsIgnoreCase(envName)) {
systemInfoService.updateProductVersion(
SystemStateEnum.STAGE_UPGRADE_DONE,
null,
Constants.formatVersionUsingV(
templateUpgrade.getMetadata().getLabels().get(LABEL_PRODUCT_VERSION)),
null);
SystemStateEnum.STAGE_UPGRADE_DONE, null, Constants.formatVersionUsingV(version), null);
} else {
systemInfoService.updateProductVersion(
SystemStateEnum.RUNNING,
null,
null,
Constants.formatVersionUsingV(
templateUpgrade.getMetadata().getLabels().get(LABEL_PRODUCT_VERSION)));
SystemStateEnum.RUNNING, null, null, Constants.formatVersionUsingV(version));
}
}

Expand Down

0 comments on commit 564dfaa

Please sign in to comment.