Browse Source

修改到docker外运行环境

tags/v1.0.0^2
林万龙 3 years ago
parent
commit
1b21d2d04c
3 changed files with 5 additions and 7 deletions
  1. +4
    -4
      src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java
  2. +0
    -1
      src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java
  3. +1
    -2
      src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java

+ 4
- 4
src/main/java/com/telpo/dipperposition/service/impl/DipperAstPosAsyncTaskServiceImpl.java View File

@@ -52,14 +52,14 @@ public class DipperAstPosAsyncTaskServiceImpl implements IDipperAstPosAsyncTaskS
// 不存在说明token是已过期了 // 不存在说明token是已过期了
String centerProvinceName = ""; String centerProvinceName = "";
String centerProvinceLonAndAlt = ""; String centerProvinceLonAndAlt = "";
String appResPath = "";
String appCsvPath = "";
try { try {
appResPath = ResourceUtils.getURL("resources:").getPath();
log.debug(appResPath);
appCsvPath = ResourceUtils.getFile("resources"+this.centerProvinceFilePath).getPath();
log.debug(appCsvPath);
} catch (Exception e) { } catch (Exception e) {
log.debug("cannot find path"); log.debug("cannot find path");
} }
List<String> centerAddressSets = CSVUtil.readCSV(appResPath + this.centerProvinceFilePath);
List<String> centerAddressSets = CSVUtil.readCSV(appCsvPath);
for (String centerAddressSet:centerAddressSets) { for (String centerAddressSet:centerAddressSets) {
String[] centerAddressSetArray = centerAddressSet.split(","); String[] centerAddressSetArray = centerAddressSet.split(",");
if (centerAddressSetArray.length < 3) { if (centerAddressSetArray.length < 3) {


+ 0
- 1
src/main/java/com/telpo/dipperposition/service/impl/DipperAstTimeAsyncTaskServiceImpl.java View File

@@ -23,7 +23,6 @@ import java.time.LocalDateTime;
public class DipperAstTimeAsyncTaskServiceImpl implements IDipperAstTimeAsyncTaskService { public class DipperAstTimeAsyncTaskServiceImpl implements IDipperAstTimeAsyncTaskService {


@Override @Override
@Async("asyncServiceExecutor")
public String pushAstTime() { public String pushAstTime() {


// 创建Socket客户端实例; // 创建Socket客户端实例;


+ 1
- 2
src/main/java/com/telpo/dipperposition/service/impl/DipperDataAsyncTaskServiceImpl.java View File

@@ -32,6 +32,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi




@Override @Override
@Async("asyncServiceExecutor")
public void pullAstEPH() { public void pullAstEPH() {
// (1) 发送bds获取星历数据 // (1) 发送bds获取星历数据
String dipperData = pullEPHFromDipper(); String dipperData = pullEPHFromDipper();
@@ -46,7 +47,6 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi
} }
} }



private String pullEPHFromDipper() { private String pullEPHFromDipper() {


// 创建Socket客户端实例; // 创建Socket客户端实例;
@@ -64,7 +64,6 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi
} }


@Override @Override
@Async("asyncServiceExecutor")
public String getAstEPH(){ public String getAstEPH(){
return (String)redisUtil.get(DIPPER_DATA_KEY); return (String)redisUtil.get(DIPPER_DATA_KEY);
} }


Loading…
Cancel
Save