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:
@@ -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));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user