liqian пре 2 година
родитељ
комит
9a4be1aa58
1 измењених фајлова са 0 додато и 25 уклоњено
  1. 0 25
      ess_instance_rov_server.py

+ 0 - 25
ess_instance_rov_server.py

@@ -49,31 +49,6 @@ def rov_server_health_check(client, instance_id, max_wait_time=None):
             time.sleep(10)
 
 
-def server_health_check(client, instance_id):
-    """
-    服务健康检查
-    :param client: 客户端连接
-    :param instance_id: instanceId
-    :return:
-    """
-    global health_instances
-    ip_address = utils.get_ip_address(client=client, instance_id=instance_id)
-    while True:
-        health_check_url = f"http://{ip_address}:5001/healthcheck"
-        try:
-            http_code = requests.get(health_check_url).status_code
-        except:
-            logging.info("images is downloading")
-            http_code = 0
-
-        if http_code == 200:
-            health_instances.append((instance_id, ip_address))
-            break
-        else:
-            # time.sleep(20)
-            await asyncio.sleep(10)
-
-
 async def ess_instance(create_client, slb_client, ess_count, max_workers):
     """
     扩容机器并运行新服务