Commit 236cd886 authored by caotao's avatar caotao

1.根据接口的实际限流策略调整华为北向接口的请求间隔,避免请求过于频繁导致限流。

parent fe925071
...@@ -145,7 +145,7 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -145,7 +145,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
String today = DateUtil.today(); String today = DateUtil.today();
String hour = new Date().getHours() + ":00"; String hour = new Date().getHours() + ":00";
try { try {
TimeUnit.SECONDS.sleep(1); TimeUnit.MINUTES.sleep(5);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -458,7 +458,7 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -458,7 +458,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
public void inverterDetail() { public void inverterDetail() {
List<String> inverterSns = imasterInverterListMapper.getCollectIds(); List<String> inverterSns = imasterInverterListMapper.getCollectIds();
try { try {
TimeUnit.SECONDS.sleep(1); TimeUnit.MINUTES.sleep(5);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
...@@ -720,7 +720,7 @@ public class ImasterDataServiceImpl implements ImasterDataService { ...@@ -720,7 +720,7 @@ public class ImasterDataServiceImpl implements ImasterDataService {
List<String> inverterSns = imasterInverterListMapper.getCollectIds(); List<String> inverterSns = imasterInverterListMapper.getCollectIds();
for (int i = 0; i < inverterSns.size(); i++) { for (int i = 0; i < inverterSns.size(); i++) {
try { try {
TimeUnit.SECONDS.sleep(1); TimeUnit.MINUTES.sleep(5);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment