empty dir fix

This commit is contained in:
Anthony Stirling 2023-12-29 13:53:55 +00:00
parent 168a0f001c
commit 610ff22abe

View file

@ -117,6 +117,10 @@ public class PipelineDirectoryProcessor {
for (PipelineOperation operation : config.getOperations()) { for (PipelineOperation operation : config.getOperations()) {
validateOperation(operation); validateOperation(operation);
File[] files = collectFilesForProcessing(dir, jsonFile, operation); File[] files = collectFilesForProcessing(dir, jsonFile, operation);
if(files == null || files.length == 0) {
logger.info("No files detected for {} ", dir);
return;
}
List<File> filesToProcess = prepareFilesForProcessing(files, processingDir); List<File> filesToProcess = prepareFilesForProcessing(files, processingDir);
runPipelineAgainstFiles(filesToProcess, config, dir, processingDir); runPipelineAgainstFiles(filesToProcess, config, dir, processingDir);
} }