[파일 업로드] tusHook 작업
- 파일 이동작업
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user