diff --git a/src/main/java/com/alist/api/common/modules/file/service/FileService.java b/src/main/java/com/alist/api/common/modules/file/service/FileService.java index 9d5def1..ca9f999 100644 --- a/src/main/java/com/alist/api/common/modules/file/service/FileService.java +++ b/src/main/java/com/alist/api/common/modules/file/service/FileService.java @@ -317,12 +317,18 @@ public class FileService { if ("post-finish".equals(type)) { try { - // 1회 빠른 이동 시도 (성공하면 MOVE_YN=Y) tryMoveNowByFileUuid(tusHookDto.getFileUuid()); + } catch (NoSuchFileException e) { + try { Thread.sleep(200); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); } + try { + tryMoveNowByFileUuid(tusHookDto.getFileUuid()); // 1회 재시도 + } catch (Exception ex) { + log.error("Move failed after retry. fileUuid={}", tusHookDto.getFileUuid(), ex); + markMovePending(tusHookDto.getFileUuid(), truncateErr(ex.toString())); + } } catch (Exception moveEx) { - log.error("Immediate move failed. fileUuid={}", tusHookDto.getFileUuid(), moveEx); - // 실패하면 큐 처리 대상으로 남기기 (MOVE_YN=N, 에러 기록) - markMovePending(tusHookDto.getFileUuid(), truncateErr(moveEx.getMessage())); + log.error("Move failed. fileUuid={}", tusHookDto.getFileUuid(), moveEx); + markMovePending(tusHookDto.getFileUuid(), truncateErr(moveEx.toString())); } }