|
|
@@ -22,7 +22,7 @@ public class AdminAdvertiserListServiceImpl implements IAdminAdvertiserListServi
|
|
|
private AdminAdvertiserListMapper adminAdvertiserListMapper;
|
|
|
@Override
|
|
|
public JSONObject bytedanceAdvertiserThreadPool(Integer totalPage, Integer pageSize, Long adminAdvertiserId, Long ccAccountId, String accessToken) {
|
|
|
- ExecutorService executor = Executors.newFixedThreadPool(10);
|
|
|
+ ExecutorService executor = Executors.newFixedThreadPool(5);
|
|
|
// 3. 创建线程安全的结果收集器
|
|
|
List<Future<AdminAdvertiserListServiceImpl.PageResult>> futures = new ArrayList<>();
|
|
|
|
|
|
@@ -122,6 +122,11 @@ public class AdminAdvertiserListServiceImpl implements IAdminAdvertiserListServi
|
|
|
|
|
|
|
|
|
private List<String> getBytedanceAccountList(Long adminAdvertiserId, Long ccAccountId, String accessToken, Integer page, Integer pageSize, Integer requestCount) {
|
|
|
+ try {
|
|
|
+ Thread.sleep(100);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
if (requestCount > 3) {
|
|
|
log.error("重试次数大于3次,跳出本页数据请求任务,adminAdvertiserId:{}", adminAdvertiserId);
|
|
|
List<String> data = new ArrayList<>();
|