use of com.orion.ops.entity.domain.ApplicationVcsDO in project orion-ops by lijiahangmax.
the class CleanVcsStatusRunner method checkFinished.
/**
* 检查已初始化的数据
*/
private void checkFinished() {
LambdaQueryWrapper<ApplicationVcsDO> wrapper = new LambdaQueryWrapper<ApplicationVcsDO>().eq(ApplicationVcsDO::getVcsStatus, VcsStatus.OK.getStatus());
List<ApplicationVcsDO> vcsList = applicationVcsDAO.selectList(wrapper);
for (ApplicationVcsDO vcs : vcsList) {
// 检查是否存在
Long id = vcs.getId();
File clonePath = new File(Utils.getVcsEventDir(id));
if (Files1.isDirectory(clonePath)) {
continue;
}
// 更新状态
ApplicationVcsDO update = new ApplicationVcsDO();
update.setId(id);
update.setVcsStatus(VcsStatus.UNINITIALIZED.getStatus());
applicationVcsDAO.updateById(update);
log.info("重置版本仓库状态-重置 id: {}, clonePath: {}", id, clonePath);
}
}
Aggregations