From d65548fbc9cd6f81c6c9ea4d2a3a97b3b7175f8c Mon Sep 17 00:00:00 2001 From: WytheLi Date: Fri, 15 Nov 2024 17:52:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(redis):=20redis=E5=8D=95=E6=8D=AE=E8=81=94?= =?UTF-8?q?=E8=B0=83=20#7872=20#=20Reviewed,=20transaction=20id:=2023995?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticket/builders/redis/redis_single_ins_migrate.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/dbm-ui/backend/ticket/builders/redis/redis_single_ins_migrate.py b/dbm-ui/backend/ticket/builders/redis/redis_single_ins_migrate.py index 5e00a12817..38c24c7f33 100644 --- a/dbm-ui/backend/ticket/builders/redis/redis_single_ins_migrate.py +++ b/dbm-ui/backend/ticket/builders/redis/redis_single_ins_migrate.py @@ -38,19 +38,15 @@ class RedisSingleInsMigrateBuilder(builders.FlowParamBuilder): controller = RedisController.redis_single_ins_migrate def format_ticket_data(self): - for item in self.ticket_data["infos"]: - item["src_master"] = f'{item["old_nodes"]["master"][0]["ip"]}:{item["old_nodes"]["master"][0]["port"]}' - item["src_slave"] = f'{item["old_nodes"]["slave"][0]["ip"]}:{item["old_nodes"]["slave"][0]["port"]}' - - self.ticket_data.update(self.ticket_data["infos"][0]) cluster = Cluster.objects.get(id=self.ticket_data["cluster_id"]) - self.ticket_data.update(bk_cloud_id=cluster.bk_cloud_id, db_version=cluster.major_version) + self.ticket_data.update( + cluster_id=cluster.id, bk_cloud_id=cluster.bk_cloud_id, db_version=cluster.major_version + ) class RedisSingleInstanceApplyResourceParamBuilder(builders.ResourceApplyParamBuilder): def format(self): self.patch_info_affinity_location(roles=["backend_group"]) - self.ticket_data.update(self.ticket_data["infos"][0]) def post_callback(self): next_flow = self.ticket.next_flow()