Commit 1209ca3fd4bae60b6d58c356f91f5d66e271f201

Authored by fangcheng
1 parent 5b9fb0c634
Exists in master

远程无法访问等情况,临时队列反压回队列

Showing 2 changed files with 8 additions and 3 deletions

parent/center.manager/src/main/java/com/lyms/cm/job/SyncFixJob.java View file @ 1209ca3
... ... @@ -14,6 +14,7 @@
14 14 import com.baomidou.mybatisplus.mapper.EntityWrapper;
15 15 import com.lyms.base.common.entity.organ.OrganGroup;
16 16 import com.lyms.base.common.service.organ.OrganGroupService;
  17 +import com.lyms.base.common.service.sys.impl.SyncDataBasicServiceImpl;
17 18 import com.lyms.sync.ParamsAdpter;
18 19 import com.lyms.sync.SyncCallback;
19 20 import com.lyms.sync.SyncCenter;
... ... @@ -46,7 +47,7 @@
46 47  
47 48 private static List<String> pullUrlList = null;
48 49  
49   - private static String remoteClazz = "com.lyms.hospital.service.sys.impl.SyncDataBasicServiceImpl";
  50 + private static String remoteClazz = SyncDataBasicServiceImpl.class.getName();
50 51 private static String remoteMethod = "selectOne";
51 52  
52 53 private final AtomicBoolean reset = new AtomicBoolean(false);
parent/center.manager/src/main/java/com/lyms/cm/job/SyncTmpJob.java View file @ 1209ca3
... ... @@ -46,10 +46,14 @@
46 46 if (model != null) {
47 47 // 任务发送执行
48 48 String result = HttpUtils.REMOTE.post(model);
  49 + if(result == null){//远程无法访问等情况
  50 + work.backPressure();
  51 + return;
  52 + }
49 53 model = JsonUtils.jsonToBean(result, ChannelData.class);
50 54 if (model != null && model.getAck()) {
51   - work.backPressure();
52   - }
  55 + work.backPressure();
  56 + }
53 57 }
54 58 }
55 59 }