liqian преди 2 години
родител
ревизия
6becc39708
променени са 2 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 1 1
      ess_instance_rov_server.py
  2. 2 2
      utils.py

+ 1 - 1
ess_instance_rov_server.py

@@ -41,7 +41,7 @@ async def ess_instance(create_client, slb_client, ess_count, max_workers):
     # 4. 异步探活
     global health_instances
     health_instances = []
-    max_wait_time = 180
+    max_wait_time = 120
     loop = asyncio.get_running_loop()
     executor = ThreadPoolExecutor(max_workers=max_workers)
     tasks = [

+ 2 - 2
utils.py

@@ -317,7 +317,7 @@ def rov_server_health_check(client, instance_id, max_wait_time=None):
     服务健康检查
     :param client: 客户端连接
     :param instance_id: instanceId
-    :param max_wait_time: 最长等待时间,单位:ms
+    :param max_wait_time: 最长等待时间,单位:s
     :return:
     """
     global health_instances
@@ -337,7 +337,7 @@ def rov_server_health_check(client, instance_id, max_wait_time=None):
             break
         elif max_wait_time is not None:
             now = time.time()
-            if (now - start_time) * 1000 >= max_wait_time:
+            if (now - start_time) >= max_wait_time:
                 logging.info(f"health check error, instance: {instance_id}/{ip_address}")
                 break
             else: