|
|
@@ -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或者缓存"); |
|
|
|