|  | @@ -103,7 +103,7 @@ def update_instance(create_client, alb_client, instance_id, version):
 | 
	
		
			
				|  |  |      """
 | 
	
		
			
				|  |  |      logging.info(f"update instance: {instance_id}")
 | 
	
		
			
				|  |  |      # 1. 摘流量,将权重降为0
 | 
	
		
			
				|  |  | -    health_instance_ids = [instance_id]  
 | 
	
		
			
				|  |  | +    health_instance_ids = [instance_id]
 | 
	
		
			
				|  |  |      weight_list = [(0, 10)]  # 设置权重为0,等待10秒
 | 
	
		
			
				|  |  |      utils.set_instance_weight_process_with_alb(alb_client,
 | 
	
		
			
				|  |  |                                                 longvideo_config.server_group_id_list,
 | 
	
	
		
			
				|  | @@ -147,7 +147,7 @@ def update_instance(create_client, alb_client, instance_id, version):
 | 
	
		
			
				|  |  |      health_instance_ids = [instance_id for instance_id, _ in health_instances]
 | 
	
		
			
				|  |  |      for server_group_id in longvideo_config.server_group_id_list:
 | 
	
		
			
				|  |  |          for instance_id in health_instance_ids:
 | 
	
		
			
				|  |  | -            utils.add_servers_to_server_group(alb_client, server_group_id, instance_id, weight=100)  # 设定权重为100
 | 
	
		
			
				|  |  | +            utils.add_servers_to_server_group(alb_client, server_group_id, instance_id, weight=0)
 | 
	
		
			
				|  |  |              logging.info(f"Successfully added instance {instance_id} to server group {server_group_id}.")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      add_weight_list = [(10, 5), (20, 5), (40, 5), (60, 5), (80, 5), (100, 5)]
 | 
	
	
		
			
				|  | @@ -188,4 +188,3 @@ def main():
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  if __name__ == '__main__':
 | 
	
		
			
				|  |  |      main()
 | 
	
		
			
				|  |  | -
 |