supeng 4 months ago
parent
commit
0a0f2f094e
2 changed files with 3 additions and 2 deletions
  1. 2 1
      gateway/gateway_update.py
  2. 1 1
      longvideoapi/utils.py

+ 2 - 1
gateway/gateway_update.py

@@ -65,7 +65,8 @@ def update(instance_id, port):
         print("开始健康检查")
         checkHealth(ipadd)
         print("%s :权重修改中......" % (ipadd))
-        weight_list = [(10, 5), (20, 5), (40, 5), (60, 5), (80, 5), (100, 5)]
+        # weight_list = [(10, 5), (20, 5), (40, 5), (60, 5), (80, 5), (100, 5)]
+        weight_list = [(10, 10), (20, 10), (40, 10), (60, 10), (80, 10), (100, 10)]
         utils.update_server_group_servers_attribute(alb_client, gateway_config.server_group_id_list, instance_id_list=[instance_id], weight_list=weight_list, port=port)
         success_count += 1
         print("更新进度" + "%s/%s" % (success_count, total))

+ 1 - 1
longvideoapi/utils.py

@@ -515,6 +515,6 @@ def update_server_group_servers_attribute(alb_client, server_group_id_list, inst
     #     for instance_id in instance_id_list:
     for weight, sleep_time in weight_list:
         update_server_group_server_weight(alb_client, server_group_id_list, instance_id_list, weight, port)
-    time.sleep(sleep_time)
+        time.sleep(sleep_time)