summaryrefslogtreecommitdiffstats
path: root/engine-d/src
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-09 23:37:11 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-09 23:37:11 +0800
commit9e9afccb7bb6f012314269ba0caf57ddc4e6dc1d (patch)
treebc2bcd05e44222bddbf01deab34f1a211aaa4a26 /engine-d/src
parent95058849173aea890e3b4f623395ce7c49714ea6 (diff)
Fix Some Bugs
Change-Id: Ie614f6ed325281fdc93644638e882541941e3690 Issue-ID: HOLMES-85 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d/src')
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
index 141d89e..009de8e 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/dmaap/DMaaPAlarmPolling.java
@@ -15,6 +15,8 @@
*/
package org.onap.holmes.engine.dmaap;
+import static jdk.nashorn.internal.runtime.regexp.joni.Config.log;
+
import java.util.ArrayList;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
@@ -42,9 +44,19 @@ public class DMaaPAlarmPolling implements Runnable {
vesAlarmList = subscriber.subscribe();
vesAlarmList.forEach(vesAlarm -> droolsEngine.putRaisedIntoStream(vesAlarm));
} catch (CorrelationException e) {
- log.error("Failed to process alarms.", e);
+ log.error("Failed to process alarms. Sleep for 60 seconds to restart.", e);
+ try {
+ Thread.sleep(60000);
+ } catch (InterruptedException e1) {
+ log.info("Thread is still active.", e);
+ }
} catch (Exception e) {
- log.error("An error occurred while processing alarm.", e);
+ log.error("An error occurred while processing alarm. Sleep for 60 seconds to restart.", e);
+ try {
+ Thread.sleep(60000);
+ } catch (InterruptedException e1) {
+ log.info("Thread is still active.", e);
+ }
}
}
}