fix build rollback

This commit is contained in:
bwcx_jzy 2023-02-14 19:12:05 +08:00
parent 8c709f57d2
commit 1b105b4076
No known key found for this signature in database
GPG Key ID: 5E48E9372088B9E5
2 changed files with 9 additions and 4 deletions

View File

@ -94,7 +94,7 @@ import java.util.stream.Collectors;
*/
@Builder
@Slf4j
public class ReleaseManage implements Runnable {
public class ReleaseManage {
private final UserModel userModel;
private final Integer buildNumberId;
@ -594,10 +594,15 @@ public class ReleaseManage implements Runnable {
logRecorder.system("分发结果:{}", status.getDesc());
}
@Override
public void run() {
/**
* 回滚
*/
public void rollback() {
try {
BaseServerController.resetInfo(userModel);
// 重新标记为发布中
this.updateStatus(BuildStatus.PubIng);
//
boolean start = this.start();
if (start) {
this.updateStatus(BuildStatus.PubSuccess);

View File

@ -179,7 +179,7 @@ public class BuildInfoManageController extends BaseServerController {
.buildEnv(environmentMapBuilder)
.build();
//
ThreadUtil.execute(manage);
ThreadUtil.execute(manage::rollback);
return JsonMessage.success("重新发布中");
}