Remove dead code
[clamp.git] / src / main / java / org / onap / clamp / clds / service / CldsHealthcheckService.java
index 1b0cca6..f167916 100644 (file)
@@ -27,10 +27,10 @@ import com.att.eelf.configuration.EELFManager;
 
 import java.util.Date;
 
-import org.onap.clamp.clds.dao.CldsDao;
 import org.onap.clamp.clds.model.CldsHealthCheck;
 import org.onap.clamp.clds.util.LoggingUtils;
 import org.onap.clamp.clds.util.ONAPLogConstants;
+import org.onap.clamp.loop.LoopController;
 import org.slf4j.event.Level;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
@@ -45,7 +45,7 @@ import org.springframework.stereotype.Component;
 public class CldsHealthcheckService {
 
     @Autowired
-    private CldsDao cldsDao;
+    private LoopController loopController;
 
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsHealthcheckService.class);
 
@@ -62,7 +62,7 @@ public class CldsHealthcheckService {
         LoggingUtils.setTimeContext(startTime, new Date());
         boolean healthcheckFailed = false;
         try {
-            cldsDao.doHealthCheck();
+            loopController.getLoopNames();
             cldsHealthCheck.setHealthCheckComponent("CLDS-APP");
             cldsHealthCheck.setHealthCheckStatus("UP");
             cldsHealthCheck.setDescription("OK");
@@ -79,11 +79,10 @@ public class CldsHealthcheckService {
         LoggingUtils.setTimeContext(startTime, new Date());
         if (healthcheckFailed) {
             util.exiting(HttpStatus.INTERNAL_SERVER_ERROR.toString(), "Healthcheck failed", Level.INFO,
-                         ONAPLogConstants.ResponseStatus.ERROR);
+                    ONAPLogConstants.ResponseStatus.ERROR);
             return new ResponseEntity<>(cldsHealthCheck, HttpStatus.INTERNAL_SERVER_ERROR);
         } else {
-            util.exiting("200", "Healthcheck failed", Level.INFO,
-                         ONAPLogConstants.ResponseStatus.COMPLETED);
+            util.exiting("200", "Healthcheck failed", Level.INFO, ONAPLogConstants.ResponseStatus.COMPLETED);
             return new ResponseEntity<>(cldsHealthCheck, HttpStatus.OK);
         }
     }