|
|
@@ -168,23 +168,17 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
|
|
|
@Override
|
|
|
public void matchCrawlerVideo() throws InterruptedException {
|
|
|
List<NewMatchVideo> videos = queryMatchVideosByStatus(NewContentStatusEnum.KIMI_SUCCESS);
|
|
|
- if (CollectionUtils.isEmpty(videos)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- for (NewMatchVideo video : videos) {
|
|
|
- processCrawlerMatchContent(video);
|
|
|
- }
|
|
|
+ processVideosInParallel(videos,
|
|
|
+ this::processCrawlerMatchContent,
|
|
|
+ newMatchCrawlerVideoPoolExecutor);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void uploadCrawlerVideo() throws InterruptedException {
|
|
|
List<NewMatchVideo> videos = queryMatchVideosByStatus(NewContentStatusEnum.CRAWLER_SUCCESS);
|
|
|
- if (CollectionUtils.isEmpty(videos)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- for (NewMatchVideo video : videos) {
|
|
|
- processUploadCrawlerVideo(video);
|
|
|
- }
|
|
|
+ processVideosInParallel(videos,
|
|
|
+ this::processUploadCrawlerVideo,
|
|
|
+ newUploadCrawlerVideoPoolExecutor);
|
|
|
}
|
|
|
|
|
|
private void processKimiMatchContent(NewMatchVideo newMatchVideo) {
|