Skip to content

Commit 5e2699a

Browse files
xiepaupiSecloud
authored andcommitted
feat(redis): 忽略自愈的,显示露切的实例 #10163
1 parent 83a3735 commit 5e2699a

File tree

1 file changed

+4
-3
lines changed
  • dbm-ui/backend/db_services/redis/autofix

1 file changed

+4
-3
lines changed

dbm-ui/backend/db_services/redis/autofix/watcher.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def save_swithed_host_by_cluster(batch_small: int, switch_hosts: Dict):
245245

246246
# 把需要忽略自愈的保存起来
247247
def save_ignore_host(switched_host: RedisSwitchHost, msg):
248-
rst = RedisIgnoreAutofix.objects.update_or_create(
248+
RedisIgnoreAutofix.objects.update_or_create(
249249
bk_cloud_id=DEFAULT_BK_CLOUD_ID,
250250
bk_biz_id=switched_host.bk_biz_id,
251251
cluster_id=switched_host.cluster_id,
@@ -273,6 +273,7 @@ def save_ignore_host(switched_host: RedisSwitchHost, msg):
273273
msgs[_("BKID")] = switched_host.bk_biz_id
274274
msgs[_("故障IP")] = switched_host.ip
275275
msgs[_("实例类型")] = switched_host.instance_type
276-
msgs[_("ByDBHA")] = json.dumps(switched_host.sw_result)
277-
msgs[_("xxxxxx")] = rst
276+
msgs[_("ByDBHA")] = _(
277+
"待切换的实例:{}".format(list(set(switched_host.cluster_ports) - set((switched_host.sw_result))))
278+
)
278279
send_msg_2_qywx(title, msgs)

0 commit comments

Comments
 (0)