summaryrefslogtreecommitdiffstats
path: root/engine-d/src/main/java/org/onap
diff options
context:
space:
mode:
authortang peng <tang.peng5@zte.com.cn>2017-11-09 15:43:17 +0000
committerGerrit Code Review <gerrit@onap.org>2017-11-09 15:43:17 +0000
commit0cd31c398821790857c9f4862df35f684eab52fc (patch)
tree204c65214a3bb23f34e95b08cb643871e9714cd4 /engine-d/src/main/java/org/onap
parent79f4bc6b31cfc357c7268c6dfba30a6dc0f8abd9 (diff)
parent9e9afccb7bb6f012314269ba0caf57ddc4e6dc1d (diff)
Merge "Fix Some Bugs"
Diffstat (limited to 'engine-d/src/main/java/org/onap')
-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);
+ }
}
}
}