RED-4269: Do not schedule deleted files

This commit is contained in:
deiflaender 2022-06-15 09:29:51 +02:00
parent 40a16bd258
commit 675275c20a

View File

@ -180,7 +180,8 @@ public interface FileRepository extends JpaRepository<FileEntity, String> {
@Query("select f from FileEntity f join DossierEntity d on d.id = f.dossierId where f.workflowStatus <> 'APPROVED' and f.excludedFromAutomaticAnalysis = false " +
"and ( f.processingStatus = 'PROCESSED' or f.processingStatus = 'UNPROCESSED' or f.processingStatus = 'ERROR' )" +
"and d.softDeletedTime is null and d.hardDeletedTime is null and d.archivedTime is null ")
"and d.softDeletedTime is null and d.hardDeletedTime is null and d.archivedTime is null " +
"and f.deleted is null and f.hardDeletedTime is null")
List<FileEntity> getAllRelevantStatusesForReanalysisScheduler();
@Modifying(clearAutomatically = true)