wangyunpeng vor 5 Tagen
Ursprung
Commit
a39bcc3b45

+ 2 - 2
server/src/main/java/com/tzld/videoVector/controller/HealthController.java

@@ -37,7 +37,7 @@ public class HealthController {
     @GetMapping("/healthcheck")
     @NoRequestLog
     public ResponseEntity<String> healthcheck() {
-        if (!checkDB(videoVectorDataSource, "mysql") || !checkDB(pgVectorDataSource, "pgvector")) {
+        if (!checkDB(pgVectorDataSource, "pgvector")) {
             return ResponseEntity.status(HttpStatus.SERVICE_UNAVAILABLE).body("db not ready");
         }
         if (!checkRedis()) {
@@ -59,7 +59,7 @@ public class HealthController {
 
     private boolean checkRedis() {
         try {
-            Object result = redisConnectionFactory.getConnection().execute("PING");
+            String result = redisConnectionFactory.getConnection().ping();
             return "PONG".equals(result);
         } catch (Exception e) {
             log.warn("healthcheck: redis not ready — {}", e.getMessage());

+ 1 - 1
server/src/main/java/com/tzld/videoVector/listener/StartupWarmupListener.java

@@ -66,7 +66,7 @@ public class StartupWarmupListener {
 
     private void warmUpRedis() {
         try {
-            Object result = redisConnectionFactory.getConnection().execute("PING");
+            String result = redisConnectionFactory.getConnection().ping();
             if ("PONG".equals(result)) {
                 log.info("redis connection pool ready");
             } else {