summaryrefslogtreecommitdiffstats
path: root/engine-d/src
diff options
context:
space:
mode:
authortang peng <tang.peng5@zte.com.cn>2021-12-02 02:27:45 +0000
committerGerrit Code Review <gerrit@onap.org>2021-12-02 02:27:45 +0000
commitf20e60d194f99d8b675972eb1e27a0a454696ea9 (patch)
treed51d34ecda0d4dcc1abba6925a8920047c62e824 /engine-d/src
parent560291e128455ccb139847b5cb410b10097cd387 (diff)
parentb91b7e660f94fc1cf23e8f778472eeaa493116df (diff)
Merge "Added exception protection. Added try-catch block to prevent the polling thread from stop."
Diffstat (limited to 'engine-d/src')
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/dcae/ConfigFileScanningTask.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/dcae/ConfigFileScanningTask.java b/engine-d/src/main/java/org/onap/holmes/engine/dcae/ConfigFileScanningTask.java
index 2835a45..15cb327 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/dcae/ConfigFileScanningTask.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/dcae/ConfigFileScanningTask.java
@@ -59,15 +59,18 @@ public class ConfigFileScanningTask implements Runnable {
DcaeConfigurations dcaeConfigurations = null;
try {
dcaeConfigurations = DcaeConfigurationParser.parse(entry.getValue().toString());
+ if (dcaeConfigurations != null) {
+ DcaeConfigurationsCache.setDcaeConfigurations(dcaeConfigurations);
+ addSubscribers(dcaeConfigurations);
+ }
} catch (CorrelationException e) {
LOGGER.error(e.getMessage(), e);
+ // reset the value of the pre-md5 so that configs could be re-processed during the next scanning.
+ prevConfigMd5 = null;
} catch (Exception e) {
LOGGER.warn("Failed to deal with the new configurations.", e);
- }
-
- if (dcaeConfigurations != null) {
- DcaeConfigurationsCache.setDcaeConfigurations(dcaeConfigurations);
- addSubscribers(dcaeConfigurations);
+ // reset the value of the pre-md5 so that configs could be re-processed during the next scanning.
+ prevConfigMd5 = null;
}
}
}