Merge "Adaptation to changes in ECS, PMS and RAPP Catalogue"
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
index db4201b..5493fd8 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
+++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/configuration/ApplicationConfig.java
@@ -23,6 +23,8 @@
import lombok.Getter;
import org.oransc.enrichment.configuration.WebClientConfig.HttpProxyConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -31,6 +33,8 @@
@ConfigurationProperties()
public class ApplicationConfig {
+ private static final Logger logger = LoggerFactory.getLogger(ApplicationConfig.class);
+
@Getter
@Value("${app.vardata-directory}")
private String vardataDirectory;
@@ -66,6 +70,11 @@
public WebClientConfig getWebClientConfig() {
if (this.webClientConfig == null) {
+ if (this.httpProxyPort == 0) {
+ logger.info("Http proxy is not used");
+ } else {
+ logger.info("Http proxy is used for RAN access {}:{}", httpProxyHost, httpProxyPort);
+ }
HttpProxyConfig httpProxyConfig = ImmutableHttpProxyConfig.builder() //
.httpProxyHost(this.httpProxyHost) //
.httpProxyPort(this.httpProxyPort) //
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJobs.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJobs.java
index f5224f2..2f36115 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJobs.java
+++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiJobs.java
@@ -165,7 +165,7 @@
out.print(gson.toJson(job));
}
} catch (Exception e) {
- logger.warn("Could not save job: {} {}", job.getId(), e.getMessage());
+ logger.warn("Could not store job: {} {}", job.getId(), e.getMessage());
}
}
diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
index c2e4b97..d73127f 100644
--- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
+++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/tasks/ProducerSupervision.java
@@ -20,8 +20,6 @@
package org.oransc.enrichment.tasks;
-import java.time.Duration;
-
import org.oransc.enrichment.configuration.ApplicationConfig;
import org.oransc.enrichment.controllers.consumer.ConsumerCallbacks;
import org.oransc.enrichment.controllers.producer.ProducerCallbacks;
@@ -86,19 +84,15 @@
}
private Mono<?> checkProducerJobs(EiProducer producer) {
+ final int MAX_CONCURRENCY = 10;
return getEiJobs(producer) //
.filter(eiJob -> !producer.isJobEnabled(eiJob)) //
- .flatMap(eiJob -> startEiJob(producer, eiJob), 1) //
+ .flatMap(eiJob -> producerCallbacks.startEiJob(producer, eiJob, Retry.max(1)), MAX_CONCURRENCY) //
.collectList() //
- .flatMapMany(eiJob -> consumerCallbacks.notifyJobStatus(producer.getEiTypes())) //
+ .flatMapMany(startedJobs -> consumerCallbacks.notifyJobStatus(producer.getEiTypes())) //
.collectList();
}
- private Mono<String> startEiJob(EiProducer producer, EiJob eiJob) {
- Retry retrySpec = Retry.fixedDelay(1, Duration.ofSeconds(1));
- return producerCallbacks.startEiJob(producer, eiJob, retrySpec);
- }
-
private Flux<EiJob> getEiJobs(EiProducer producer) {
return Flux.fromIterable(producer.getEiTypes()) //
.flatMap(eiType -> Flux.fromIterable(eiJobs.getJobsForType(eiType)));