RED-2422: Port DeletedFilesCleanupService from filemanagement service

This commit is contained in:
aoezyetimoglu 2021-10-13 12:27:20 +02:00
parent e0aa7838aa
commit 6b707936ef

View File

@ -45,6 +45,7 @@ public class DeletedFilesCleanupService {
if (fileEntity.getHardDeletedTime() == null && fileEntity.getDeleted() != null && fileEntity.getDeleted()
.isBefore(now.minusHours(settings.getSoftDeleteCleanupTime()))) {
fileService.hardDeleteFile(dossierEntity.getId(), fileEntity.getId());
fileStatusService.setFileStatusHardDeleted(fileEntity.getId());
log.info("Hard deleted file with dossier id {} and file id {}", dossierEntity.getId(), fileEntity.getId());
}
}