Compare commits
No commits in common. "dffa55ddef7f27f1ab6bc66782cd6d3b2afde0f6" and "490287e815366a290a0915df00612f58c04c22a1" have entirely different histories.
dffa55ddef
...
490287e815
|
|
@ -243,17 +243,6 @@ public class BackupTask {
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
log.warn("导出MySQL数据异常");
|
log.warn("导出MySQL数据异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
DateTime dateTime = DateUtil.offsetDay(DateUtil.date(), -1);
|
|
||||||
List<File> files = FileUtil.loopFiles(sqlScript, file -> file.lastModified() < dateTime.getTime());
|
|
||||||
files.forEach(file -> {
|
|
||||||
boolean deleteSuccess = file.delete();
|
|
||||||
String success = deleteSuccess ? "success" : "fail";
|
|
||||||
String msg = StrFormatter.format("删除文件 {} {}", file.getName(), success);
|
|
||||||
log.info(msg);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn("导出MySQL数据异常,原因 {}", e.getMessage(), e);
|
log.warn("导出MySQL数据异常,原因 {}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue