From 999f36a2b3e7298c29d36f7f5b5af1e9b787c80f Mon Sep 17 00:00:00 2001 From: sdw086 Date: Mon, 9 Mar 2026 18:02:04 +0900 Subject: [PATCH] =?UTF-8?q?[=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C]=20tusHook=20=EC=9E=91=EC=97=85=20-=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=9D=B4=EB=8F=99=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/modules/file/service/FileService.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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())); } }