Skip to content

Commit

Permalink
adjust code
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinw66 committed Jan 3, 2025
1 parent 0f875d0 commit c4189c8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@ public void onSuccess() {
}
}

@Override
public void onFailure() {
super.onFailure();

CommandDTO commandDTO = jobContext.getCommandDTO();
List<ServiceCommandDTO> serviceCommands = commandDTO.getServiceCommands();
for (ServiceCommandDTO serviceCommand : serviceCommands) {
Long clusterId = commandDTO.getClusterId();
String serviceName = serviceCommand.getServiceName();
ServicePO servicePO = serviceDao.findByClusterIdAndName(clusterId, serviceName);
servicePO.setStatus(HealthyStatusEnum.UNHEALTHY.getCode());
serviceDao.partialUpdateById(servicePO);
}
}

@Override
public String getName() {
return "Start services";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,6 @@ public void onSuccess() {
}
}

@Override
public void onFailure() {
super.onFailure();

CommandDTO commandDTO = jobContext.getCommandDTO();
List<ServiceCommandDTO> serviceCommands = commandDTO.getServiceCommands();
for (ServiceCommandDTO serviceCommand : serviceCommands) {
Long clusterId = commandDTO.getClusterId();
String serviceName = serviceCommand.getServiceName();
ServicePO servicePO = serviceDao.findByClusterIdAndName(clusterId, serviceName);
servicePO.setStatus(HealthyStatusEnum.UNHEALTHY.getCode());
serviceDao.partialUpdateById(servicePO);
}
}

@Override
public String getName() {
return "Stop services";
Expand Down

0 comments on commit c4189c8

Please sign in to comment.