diff --git a/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java b/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java index e955650..b073e78 100644 --- a/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java +++ b/src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java @@ -34,19 +34,18 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi @Override @Async("asyncServiceExecutor") public void pullAstEPH(int tryTimes) throws InterruptedException { - if (tryTimes==0) { - return; - } else { - tryTimes--; - } + tryTimes--; // (1) 发送bds获取星历数据 byte[] dipperData = pullEPHFromDipper(); // (2) 获取星历数据 if (dipperData == null) { log.error("获取星历数据错误,取不到星历数据。"); - sleep(10000); - pullAstEPH(tryTimes); + if (tryTimes>0) { + log.info("等待10秒再获取1次。"); + sleep(10000); + pullAstEPH(tryTimes); + } } else { // 保存到DB或者缓存 log.info("保存到DB或者缓存"); diff --git a/src/main/resources/bootstrap-test.yaml b/src/main/resources/bootstrap-test.yaml index 60cd53e..22f9b81 100644 --- a/src/main/resources/bootstrap-test.yaml +++ b/src/main/resources/bootstrap-test.yaml @@ -63,7 +63,7 @@ pos: centerProvince: 湖北省 astServer: agnss.techtotop.com astPosAstPort: 8012 - astEphAstHexPort: 9012 + astEphAstHexPort: 9112 astTimeout: 30000 position-server: