[파일 업로드] tusHook 작업

- 파일 이동작업
This commit is contained in:
2026-03-09 18:02:04 +09:00
parent 63a6bc82c8
commit 999f36a2b3
@@ -317,12 +317,18 @@ public class FileService {
if ("post-finish".equals(type)) { if ("post-finish".equals(type)) {
try { try {
// 1회 빠른 이동 시도 (성공하면 MOVE_YN=Y)
tryMoveNowByFileUuid(tusHookDto.getFileUuid()); 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) { } catch (Exception moveEx) {
log.error("Immediate move failed. fileUuid={}", tusHookDto.getFileUuid(), moveEx); log.error("Move failed. fileUuid={}", tusHookDto.getFileUuid(), moveEx);
// 실패하면 큐 처리 대상으로 남기기 (MOVE_YN=N, 에러 기록) markMovePending(tusHookDto.getFileUuid(), truncateErr(moveEx.toString()));
markMovePending(tusHookDto.getFileUuid(), truncateErr(moveEx.getMessage()));
} }
} }