|
@@ -34,19 +34,18 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi |
|
|
@Override |
|
|
@Override |
|
|
@Async("asyncServiceExecutor") |
|
|
@Async("asyncServiceExecutor") |
|
|
public void pullAstEPH(int tryTimes) throws InterruptedException { |
|
|
public void pullAstEPH(int tryTimes) throws InterruptedException { |
|
|
if (tryTimes==0) { |
|
|
|
|
|
return; |
|
|
|
|
|
} else { |
|
|
|
|
|
tryTimes--; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
tryTimes--; |
|
|
// (1) 发送bds获取星历数据 |
|
|
// (1) 发送bds获取星历数据 |
|
|
byte[] dipperData = pullEPHFromDipper(); |
|
|
byte[] dipperData = pullEPHFromDipper(); |
|
|
|
|
|
|
|
|
// (2) 获取星历数据 |
|
|
// (2) 获取星历数据 |
|
|
if (dipperData == null) { |
|
|
if (dipperData == null) { |
|
|
log.error("获取星历数据错误,取不到星历数据。"); |
|
|
log.error("获取星历数据错误,取不到星历数据。"); |
|
|
sleep(10000); |
|
|
|
|
|
pullAstEPH(tryTimes); |
|
|
|
|
|
|
|
|
if (tryTimes>0) { |
|
|
|
|
|
log.info("等待10秒再获取1次。"); |
|
|
|
|
|
sleep(10000); |
|
|
|
|
|
pullAstEPH(tryTimes); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// 保存到DB或者缓存 |
|
|
// 保存到DB或者缓存 |
|
|
log.info("保存到DB或者缓存"); |
|
|
log.info("保存到DB或者缓存"); |
|
|