Showing
2 changed files
with
5 additions
and
1 deletions
@@ -360,9 +360,12 @@ public class HostInfoServiceImpl implements IHostInfoService { | @@ -360,9 +360,12 @@ public class HostInfoServiceImpl implements IHostInfoService { | ||
360 | 360 | ||
361 | for(String ip : dbHosts){ | 361 | for(String ip : dbHosts){ |
362 | if( !cloudHosts.contains(ip)){ | 362 | if( !cloudHosts.contains(ip)){ |
363 | + //保留127.0.0.1的ip,用作standalone类型的redis tw | ||
364 | + if(!"127.0.0.1".equals(ip)){ | ||
363 | oldIpList.add(ip); | 365 | oldIpList.add(ip); |
364 | } | 366 | } |
365 | } | 367 | } |
368 | + } | ||
366 | 369 | ||
367 | 370 | ||
368 | if(newIpList.size() > 0 ){ | 371 | if(newIpList.size() > 0 ){ |
@@ -39,7 +39,8 @@ public class UpdateHostTimeTask { | @@ -39,7 +39,8 @@ public class UpdateHostTimeTask { | ||
39 | List<String> mobjectHostIps = mObjectInfoMapper.selectAllMobjectIps(); | 39 | List<String> mobjectHostIps = mObjectInfoMapper.selectAllMobjectIps(); |
40 | List<String> deleteHostIpList = new ArrayList<>(); | 40 | List<String> deleteHostIpList = new ArrayList<>(); |
41 | for( String ip : mobjectHostIps){ | 41 | for( String ip : mobjectHostIps){ |
42 | - if( !allHostIps.contains(ip) ){ | 42 | + //保留127.0.0.1 用作stand alone redis的tw |
43 | + if( !allHostIps.contains(ip) && !"127.0.0.1".equals(ip)){ | ||
43 | deleteHostIpList.add(ip); | 44 | deleteHostIpList.add(ip); |
44 | } | 45 | } |
45 | } | 46 | } |
-
Please register or login to post a comment