File tree 1 file changed +4
-3
lines changed
dbm-ui/backend/db_services/redis/autofix
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ def save_swithed_host_by_cluster(batch_small: int, switch_hosts: Dict):
245
245
246
246
# 把需要忽略自愈的保存起来
247
247
def save_ignore_host (switched_host : RedisSwitchHost , msg ):
248
- rst = RedisIgnoreAutofix .objects .update_or_create (
248
+ RedisIgnoreAutofix .objects .update_or_create (
249
249
bk_cloud_id = DEFAULT_BK_CLOUD_ID ,
250
250
bk_biz_id = switched_host .bk_biz_id ,
251
251
cluster_id = switched_host .cluster_id ,
@@ -273,6 +273,7 @@ def save_ignore_host(switched_host: RedisSwitchHost, msg):
273
273
msgs [_ ("BKID" )] = switched_host .bk_biz_id
274
274
msgs [_ ("故障IP" )] = switched_host .ip
275
275
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
+ )
278
279
send_msg_2_qywx (title , msgs )
You can’t perform that action at this time.
0 commit comments