ADD input structure for metadata

This commit is contained in:
2025-07-08 18:11:41 +02:00
parent 2958dd8cd7
commit 6d4146ed85
5 changed files with 48 additions and 43 deletions

View File

@@ -30,6 +30,7 @@ public class DirectoryService {
private String tempOutputsDir;
private static final long TEMP_DIR_TIMELIMIT = 3 * 60 * 60 * (long) 1000; // 3 hours
private static final long TEMP_DIR_CLEANUP_RATE = 30 * 60 * (long) 1000; // 30 minutes
public File getTempInputFile(String id, String extension) {
String dir = tempInputsDir + File.separator + id + (extension.isEmpty() ? "" : "." + extension);
@@ -111,7 +112,7 @@ public class DirectoryService {
createDirectory(outputDir);
}
@Scheduled(fixedRate = (30 * 60 * 1000))
@Scheduled(fixedRate = TEMP_DIR_CLEANUP_RATE)
public void cleanTempDirectories() throws IOException {
cleanUpDirectory(tempInputsDir);
cleanUpDirectory(tempOutputsDir);