Search in sources :

Example 1 with TransferResult

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);
}
Also used : RestResult(com.ibeiliao.deployment.admin.common.RestResult) TransferResult(com.ibeiliao.deployment.transfer.vo.TransferResult)

Aggregations

RestResult (com.ibeiliao.deployment.admin.common.RestResult)1 TransferResult (com.ibeiliao.deployment.transfer.vo.TransferResult)1