Skip to content

Commit f4b8693

Browse files
authored
Merge pull request #80 from Block-Guard/feat/#76/fraud-type-news-api
[Refactor] 비동기 처리로 변경
2 parents f0516c3 + de234f1 commit f4b8693

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/blockguard/server/domain/news/scheduler/NewsSaveScheduler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.blockguard.server.infra.crawler.DaumNewsCrawler;
55
import lombok.RequiredArgsConstructor;
66
import lombok.extern.slf4j.Slf4j;
7+
import org.springframework.scheduling.annotation.Async;
78
import org.springframework.scheduling.annotation.Scheduled;
89
import org.springframework.stereotype.Component;
910

@@ -34,11 +35,12 @@ public class NewsSaveScheduler {
3435
Map.entry(Category.ETC, List.of("몸캠"))
3536
);
3637

37-
38+
@Async
3839
public void crawlingForAdmin() {
3940
crawlAll();
4041
}
4142

43+
@Async
4244
// @Scheduled(cron = "0 0 4 * * *")
4345
public void saveNewsArticles() {
4446
crawlAll();

0 commit comments

Comments
 (0)