Commit d12a41c50e0d4434cfeb5013d42554c4ec496e25

Authored by fangcheng
1 parent 04c5eb3a22
Exists in master

同步任务容错处理

Showing 3 changed files with 12 additions and 4 deletions

parent/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java View file @ d12a41c
... ... @@ -89,7 +89,13 @@
89 89 //LOG.info("返回结果: " + result);
90 90 if (StringUtils.isBlank(result))
91 91 return;
92   - ChannelData data = JsonUtils.jsonToBean(result, ChannelData.class);
  92 + ChannelData data = null;
  93 + try{
  94 + data = JsonUtils.jsonToBean(result, ChannelData.class);
  95 + }catch(Exception e){
  96 + LOG.error("同步数据转换异常,请求结果:{} ",result);
  97 + return;
  98 + }
93 99 // 处理回执消息
94 100 if (data != null && data.getAck() && StrUtils.isNotEmpty(data.getRemoteClazz()) && StrUtils.isNotEmpty(data.getRemoteMethod())) {
95 101 // 拉取到数据执行本地方法
parent/hospital.web/src/main/resources/dev/redis.properties View file @ d12a41c
... ... @@ -3,6 +3,9 @@
3 3 redis.password1=Lyms123456
4 4 #redis.host1=127.0.0.1
5 5 #redis.port1=6379
  6 +#redis.password1=
  7 +#redis.host1=127.0.0.1
  8 +#redis.port1=6379
6 9 #redis.password1=Lyms123456
7 10  
8 11  
... ... @@ -29,6 +32,6 @@
29 32 redis.maxActive=600
30 33 redis.maxWait=1000
31 34 redis.testOnBorrow=true
32   -redis.HttpSession.redisNamespace=hospital
  35 +redis.HttpSession.redisNamespace=center
33 36 spring.redis.cluster.max-redirects= 3
parent/hospital.web/src/main/resources/xml/app-timer.xml View file @ d12a41c
... ... @@ -18,6 +18,5 @@
18 18 </task:scheduled-tasks>
19 19  
20 20 <bean class="com.lyms.hospital.job.SyncPushToCenterJob" id="syncPushToCenterJob"/>
21   -
22 21 </beans>