RED-6468 - Exception in persistence service for DownloadCleanupJob (very rarely)
- changed the lazy loading to eager for dossier in download status entity
This commit is contained in:
parent
079d48c0e4
commit
a2feec73e6
@ -61,7 +61,7 @@ public class DownloadStatusEntity {
|
||||
@Column
|
||||
long fileSize;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = FetchType.EAGER)
|
||||
DossierEntity dossier;
|
||||
|
||||
@ManyToMany
|
||||
|
||||
@ -63,7 +63,7 @@ public class DownloadCleanupJob implements Job {
|
||||
downloadStatus.getCreationDate().plusHours(applicationConfigurationEntity.getDownloadCleanupNotDownloadFilesHours()),
|
||||
now);
|
||||
deleteDownload(downloadStatus);
|
||||
} else if (dossier != null && dossierService.getDossierById(dossier.getId()).getSoftDeletedTime() != null) {
|
||||
} else if (dossier != null && dossier.getSoftDeletedTime() != null) {
|
||||
log.info("3. Deleting download {}, because dossier does not exist", downloadStatus.getStorageId());
|
||||
deleteDownload(downloadStatus);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user