summaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2021-02-17 14:35:54 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-17 14:35:54 +0000
commitba4f60d79b9039c9cb1db46e68c4e9b3efe8f708 (patch)
treeb7e1aa340c13abddd6019c350dda8f59efabff0b /adapters/mso-requests-db-adapter
parent207a5e38c1f565c4f07f54b7ff174c0002fdb413 (diff)
parentd5968f56b382c50dfafc3b6feeccf5b81d176b9d (diff)
Merge "update camunda and spring to latest versions"
Diffstat (limited to 'adapters/mso-requests-db-adapter')
-rw-r--r--adapters/mso-requests-db-adapter/pom.xml18
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java4
2 files changed, 5 insertions, 17 deletions
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
index 881d47ba85..a488558610 100644
--- a/adapters/mso-requests-db-adapter/pom.xml
+++ b/adapters/mso-requests-db-adapter/pom.xml
@@ -16,11 +16,7 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-jdbc</artifactId>
+ <artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -67,7 +63,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -90,17 +86,9 @@
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
- <artifactId>micrometer-core</artifactId>
- </dependency>
- <dependency>
- <groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-rest</artifactId>
- </dependency>
- <dependency>
<groupId>org.onap.so</groupId>
<artifactId>cxf-logging</artifactId>
<version>${project.version}</version>
@@ -136,7 +124,6 @@
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>3.3.3</version>
</dependency>
-
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-ri</artifactId>
@@ -184,7 +171,6 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>${springboot.version}</version>
<configuration>
<mainClass>org.onap.so.adapters.requestsdb.application.MSORequestDBApplication</mainClass>
</configuration>
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());