GH-629 - Improve repository interaction in DefaultEventPublicationRegistry.

DefaultEventPublicationRegistry is now directly invoking the corresponding repository to delete events older than a certain duration.
This commit is contained in:
Oliver Drotbohm
2024-05-23 10:21:07 +02:00
parent adb8411d0b
commit 3c7c448a01

View File

@@ -158,9 +158,7 @@ public class DefaultEventPublicationRegistry
var now = clock.instant();
deletePublications(event -> event.getCompletionDate()
.filter(date -> date.isBefore(now.minus(duration)))
.isPresent());
events.deleteCompletedPublicationsBefore(now.minus(duration));
}
/*