Ensure clean up of uploaded file if job fails. #9

Merged
niat8586 merged 1 commits from failed-job-cleanup into develop 2025-02-04 06:43:13 +01:00

View File

@ -95,6 +95,7 @@ public class JobProcessorService {
logger.info("Transcription failed for file: {}", managedJob.getFileName());
managedJob.setJobStatus(JobStatus.FAILED);
fileMetadataRepository.saveAndFlush(managedJob);
cleanupFile(managedJob);
break;
}
} catch (ObjectOptimisticLockingFailureException e) {