root 2 жил өмнө
parent
commit
f741383589

+ 2 - 2
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/common/util/KubernetesUtil.java

@@ -237,12 +237,12 @@ public class KubernetesUtil {
      * @param podName       pod 名称
      */
     public static void deletePodSync(ApiClient apiClient, String namespaceName, String podName) throws ApiException, InterruptedException {
-        log.info("KubernetesUtil--deletePod 删除 " + namespaceName + ":" + podName);
+        log.info("deletePodSync() 删除 " + namespaceName + ":" + podName);
         CoreV1Api coreV1Api = new CoreV1Api(apiClient);
         coreV1Api.deleteNamespacedPod(podName, namespaceName, null, null, null, null, null, null);
         // 检查是否删除完毕
         while (true) {
-            Thread.sleep(5000L);
+            TimeUnit.SECONDS.sleep(7);
             List<String> podNameList = getPod(apiClient, namespaceName);
             if (!podNameList.contains(podName)) {
                 return;

+ 0 - 1
simulation-resource-scheduler/src/main/java/com/css/simulation/resource/scheduler/common/util/RedisUtil.java

@@ -20,7 +20,6 @@ public class RedisUtil {
 
     public static void deleteByPrefix(StringRedisTemplate stringRedisTemplate, String prefix) {
         Set<String> keySetByPrefix = getKeySetByPrefix(stringRedisTemplate, prefix);
-        log.info("deleteByPrefix() 即将删除 redis 键值对:" + keySetByPrefix);
         deleteByKeyCollection(stringRedisTemplate, keySetByPrefix);
     }