|
@@ -40,30 +40,6 @@ def server_health_check(client, instance_id):
|
|
time.sleep(10)
|
|
time.sleep(10)
|
|
|
|
|
|
|
|
|
|
-# def set_instance_weight_process(client, instance_id_list, weight_list):
|
|
|
|
-# """
|
|
|
|
-# 修改服务器的权重值
|
|
|
|
-# :param client: slb客户端连接
|
|
|
|
-# :param instance_id_list: instance id list
|
|
|
|
-# :param weight_list: 权重修改列表 type-list [(weight, sleep_time), ...]
|
|
|
|
-# :return:
|
|
|
|
-# """
|
|
|
|
-# for weight, sleep_time in weight_list:
|
|
|
|
-# logging.info(f"修改权重中: weight = {weight}")
|
|
|
|
-# flag = True
|
|
|
|
-# while flag:
|
|
|
|
-# try:
|
|
|
|
-# utils.set_weight_for_instances(client=client,
|
|
|
|
-# slb_id=rov_server_config.slb_id,
|
|
|
|
-# instance_id_list=instance_id_list,
|
|
|
|
-# weight=weight)
|
|
|
|
-# time.sleep(sleep_time)
|
|
|
|
-# flag = False
|
|
|
|
-# except Exception as e:
|
|
|
|
-# time.sleep(10)
|
|
|
|
-# continue
|
|
|
|
-
|
|
|
|
-
|
|
|
|
async def ess_instance(create_client, slb_client, ess_count, max_workers, version):
|
|
async def ess_instance(create_client, slb_client, ess_count, max_workers, version):
|
|
"""
|
|
"""
|
|
扩容机器并运行新服务
|
|
扩容机器并运行新服务
|