Browse Source

update gateway

supeng 4 months ago
parent
commit
459e11cc89
1 changed files with 2 additions and 2 deletions
  1. 2 2
      gateway/gateway_update.py

+ 2 - 2
gateway/gateway_update.py

@@ -7,7 +7,7 @@ import queue
 import threading
 import time
 import gateway_config
-from util import utils
+import utils
 
 # 从配置文件中获取应用程序名称和容器仓库地址
 apps = gateway_config.apps
@@ -66,7 +66,7 @@ def update(instance_id, port):
         checkHealth(ipadd)
         print("%s :权重修改中......" % (ipadd))
         weight_list = [(10, 5), (20, 5), (40, 5), (60, 5), (80, 5), (100, 5)]
-        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)
+        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))
     except Exception as e: