use of com.ibeiliao.deployment.transfer.vo.TransferResult in project Corgi by kevinYin.
the class ViewProjectController method transfer.
private RestResult<Object> transfer(int historyId, JavaTransferService javaTransferService) {
TransferResult transferResult = javaTransferService.pushPackageToServer();
int code = (transferResult.getSuccessType() == DeployResult.SUCCESS ? ApiCode.SUCCESS : ApiCode.FAILURE);
String message = transferResult.getFailLog();
if (StringUtils.isEmpty(message)) {
message = transferResult.getSuccessType().toString();
}
deployHistoryService.finishStopRestart(historyId, transferResult.getSuccessType());
logger.info("对服务器操作结果: {}, code: {}, message: {}", transferResult.getSuccessType(), code, message);
return new RestResult<>(code, message);
}
Aggregations