|
@@ -18,7 +18,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
@Slf4j
|
|
|
-public class BytedanceCreativeLoadJob implements Job {
|
|
|
+public class BytedanceSameDayCreativeLoadJob implements Job {
|
|
|
@Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
|
static ExecutorService executorService = null;
|
|
@@ -29,17 +29,16 @@ public class BytedanceCreativeLoadJob implements Job {
|
|
|
|
|
|
@Override
|
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
- Date getDate = DateUtils.addDay(new Date(), -1);
|
|
|
+
|
|
|
List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
|
|
|
- executorService = Executors.newFixedThreadPool(4);
|
|
|
+ executorService = Executors.newFixedThreadPool(6);
|
|
|
countDownLatch = new CountDownLatch(tokens.size());
|
|
|
tokens.forEach(token -> {
|
|
|
executorService.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
try {
|
|
|
- String getDateString = DateUtils.formatDate(getDate);
|
|
|
- //获取全量视频素材数据
|
|
|
+ String getDateString = DateUtils.formatDate(new Date());
|
|
|
advertiserDataService.getAdvertiserCreative(token, getDateString);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|