|
|
@@ -3,6 +3,7 @@ package cn.reghao.autodop.dmaster.app.service.log;
|
|
|
import cn.reghao.autodop.dmaster.app.entity.log.BuildLog;
|
|
|
import cn.reghao.autodop.dmaster.app.entity.log.DeployLog;
|
|
|
import cn.reghao.autodop.dmaster.app.entity.log.CommitLog;
|
|
|
+import cn.reghao.autodop.dmaster.app.entity.log.DeployResult;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
import java.util.concurrent.BlockingQueue;
|
|
|
@@ -31,8 +32,8 @@ public class BuildDeployLogConsumer implements Runnable {
|
|
|
logQueue.add(buildLog);
|
|
|
}
|
|
|
|
|
|
- public void addDeployLog(DeployLog deployLog) {
|
|
|
- logQueue.add(deployLog);
|
|
|
+ public void addDeployLog(DeployResult deployResult) {
|
|
|
+ logQueue.add(deployResult);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -49,10 +50,10 @@ public class BuildDeployLogConsumer implements Runnable {
|
|
|
BuildLog buildLog = (BuildLog) object;
|
|
|
logService.saveBuildLog(buildLog);
|
|
|
log.info("持久化 {} 构建日志完成...", buildLog.getAppId());
|
|
|
- } else if (object instanceof DeployLog) {
|
|
|
- DeployLog deployLog = (DeployLog) object;
|
|
|
- logService.saveDeployLog(deployLog);
|
|
|
- log.info("持久化 {} 部署日志完成...", deployLog.getAppId());
|
|
|
+ } else if (object instanceof DeployResult) {
|
|
|
+ DeployResult deployResult = (DeployResult) object;
|
|
|
+ logService.saveDeployLog(deployResult);
|
|
|
+ log.info("持久化 {} 部署日志完成...", deployResult.getAppId());
|
|
|
}
|
|
|
} catch (InterruptedException e) {
|
|
|
// 中断线程
|