From d52b5288b8fbc16ef68c73cb7bf043938f04e88f Mon Sep 17 00:00:00 2001 From: Aravindan Ramkumar <1028385+aravindanr@users.noreply.github.com> Date: Sat, 5 Dec 2020 01:15:05 -0800 Subject: [PATCH] IndexDAO setup is called on PostConstruct --- .../com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java | 2 ++ .../netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java index 807e312f5d..acc8119e4a 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchDAOV6.java @@ -63,6 +63,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import java.io.IOException; import java.text.SimpleDateFormat; @@ -206,6 +207,7 @@ private void shutdownExecutorService(ExecutorService execService) { } @Override + @PostConstruct public void setup() throws Exception { waitForHealthyCluster(); diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java index af8b8d34b3..0fa9438876 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/dao/index/ElasticSearchRestDAOV6.java @@ -70,6 +70,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import java.io.IOException; import java.io.InputStream; @@ -228,6 +229,7 @@ private void shutdownExecutorService(ExecutorService execService) { } @Override + @PostConstruct public void setup() throws Exception { waitForHealthyCluster();