diff options
Diffstat (limited to 'adapters/mso-requests-db-adapter/src')
-rw-r--r-- | adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 4fe49e38dd..89c26232bd 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -78,7 +78,9 @@ public class ArchiveInfraRequestsScheduler { + "-" + calendar.get(Calendar.YEAR)); List<InfraActiveRequests> requestsByEndTime = new ArrayList<>(); - PageRequest pageRequest = new PageRequest(0, 100); + + PageRequest pageRequest = PageRequest.of(0, 100); // Could use sorting here + do { requestsByEndTime = infraActiveRepo.findByEndTimeLessThan(archivingDate, pageRequest); logger.debug("{} requests to be archived based on End Time", requestsByEndTime.size()); |