aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'runtime-acm/src/main')
-rwxr-xr-x[-rw-r--r--]runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java14
-rwxr-xr-x[-rw-r--r--]runtime-acm/src/main/resources/application.yaml2
2 files changed, 11 insertions, 5 deletions
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
index e0d11ed9f..f8bc233e9 100644..100755
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
@@ -76,10 +76,7 @@ public class SupervisionParticipantHandler {
if (participantOpt.isPresent()) {
var participant = participantOpt.get();
- if (ParticipantState.OFF_LINE.equals(participant.getParticipantState())) {
- participant.setParticipantState(ParticipantState.ON_LINE);
- participantProvider.saveParticipant(participant);
- }
+ checkOnline(participant);
handleRestart(participant.getParticipantId());
} else {
var participant = createParticipant(participantRegisterMsg.getParticipantId(),
@@ -127,12 +124,21 @@ public class SupervisionParticipantHandler {
var participant = createParticipant(participantStatusMsg.getParticipantId(),
listToMap(participantStatusMsg.getParticipantSupportedElementType()));
participantProvider.saveParticipant(participant);
+ } else {
+ checkOnline(participantOpt.get());
}
if (!participantStatusMsg.getAutomationCompositionInfoList().isEmpty()) {
automationCompositionProvider.upgradeStates(participantStatusMsg.getAutomationCompositionInfoList());
}
}
+ private void checkOnline(Participant participant) {
+ if (ParticipantState.OFF_LINE.equals(participant.getParticipantState())) {
+ participant.setParticipantState(ParticipantState.ON_LINE);
+ participantProvider.saveParticipant(participant);
+ }
+ }
+
private void handleRestart(UUID participantId) {
var compositionIds = participantProvider.getCompositionIds(participantId);
for (var compositionId : compositionIds) {
diff --git a/runtime-acm/src/main/resources/application.yaml b/runtime-acm/src/main/resources/application.yaml
index faef54af0..8dd4b574a 100644..100755
--- a/runtime-acm/src/main/resources/application.yaml
+++ b/runtime-acm/src/main/resources/application.yaml
@@ -42,7 +42,7 @@ server:
runtime:
participantParameters:
heartBeatMs: 20000
- maxStatusWaitMs: 100000
+ maxStatusWaitMs: 200000
topicParameterGroup:
topicSources:
-