From 837375696b4b2e09a0e8abdf0ca4bd45cce13a0b Mon Sep 17 00:00:00 2001 From: Guangrong Fu Date: Wed, 25 Aug 2021 16:15:03 +0800 Subject: bugfix - engines cannot get ip when deploy rules during init Issue-ID: HOLMES-462 Signed-off-by: Guangrong Fu Change-Id: I4c494dfc7c3371fbed66d43a51513fddd50e69da --- engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java index 78f2677..cbda858 100644 --- a/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java +++ b/engine-d/src/main/java/org/onap/holmes/engine/manager/DroolsEngine.java @@ -86,6 +86,7 @@ public class DroolsEngine { @PostConstruct private void init() { alarmInfoDao = daoUtil.getJdbiDaoByOnDemand(AlarmInfoDao.class); + instanceIp = MicroServiceConfig.getMicroServiceIpAndPort()[0]; try { log.info("Drools engine initializing..."); initEngine(); @@ -102,7 +103,6 @@ public class DroolsEngine { log.error("Failed to startup the engine of Holmes: " + e.getMessage(), e); throw ExceptionUtil.buildExceptionResponse("Failed to startup Drools!"); } - instanceIp = MicroServiceConfig.getMicroServiceIpAndPort()[0]; } public void stop() { -- cgit 1.2.3-korg