Skip to content

Commit

Permalink
[feat] 매일 2시와 2시30분에 크롤링 진행
Browse files Browse the repository at this point in the history
  • Loading branch information
sanghee0820 committed Nov 15, 2024
1 parent 0af3f79 commit f92bbad
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import team7.inplace.admin.crawling.application.dto.CrawlingInfo;
import team7.inplace.global.annotation.Facade;
import team7.inplace.place.application.command.PlacesCommand;
Expand All @@ -16,7 +17,7 @@ public class CrawlingFacade {
private final KakaoCrawlingService kakaoCrawlingService;
private final VideoFacade videoFacade;

//TODO: 스케쥴링 추가 예정
@Scheduled(cron = "0 0 2 * * *", zone = "Asia/Seoul")
public void updateVideos() {
var crawlingInfos = youtubeCrawlingService.crawlAllVideos();
for (var crawlingInfo : crawlingInfos) {
Expand All @@ -29,7 +30,7 @@ public void updateVideos() {
}
}

//TODO: 스케쥴링 추가 예정
@Scheduled(cron = "0 30 2 * * *", zone = "Asia/Seoul")
public void updateVideoView() {
var crawlingInfos = videoCrawlingService.crawlingVideoView();
var videoCommands = crawlingInfos.stream()
Expand Down

0 comments on commit f92bbad

Please sign in to comment.