처리 로그 추가

master
mjkhan21 2 months ago
parent f5efb041d5
commit bee6648340

@ -105,7 +105,10 @@ public abstract class InterfaceInfoReader<T extends InterfaceInfo<?, ?>> extends
},
receiptCount()
);
if (paths.isEmpty()) return Collections.emptyList();
if (paths.isEmpty()) {
log().debug("No files found to process");
return Collections.emptyList();
}
List<FileStatus> fileStatus = paths.stream()
.map(path -> {
@ -131,9 +134,13 @@ public abstract class InterfaceInfoReader<T extends InterfaceInfo<?, ?>> extends
Map<Boolean, List<FileStatus>> successFail = fileStatus.stream() //처리 결과를 성공 / 실패로 분류
.collect(Collectors.groupingBy(FileStatus::isSuccess));
List<FileStatus> success = successFail.get(true);
List<FileStatus>
success = successFail.get(true),
fail = successFail.get(false);
log().debug("success: {}, fail: {}", !isEmpty(success) ? success.size() : 0, !isEmpty(fail) ? fail.size() : 0);
move(FileStatus.getPaths(success), successDir()); // 성공 디렉토리로 이동
move(FileStatus.getPaths(successFail.get(false)), failDir()); // 실패 디렉토리로 이동
move(FileStatus.getPaths(fail), failDir()); // 실패 디렉토리로 이동
return isEmpty(success) ?
Collections.emptyList() :

Loading…
Cancel
Save