fix: OSINT 중복 체크를 title 단독 조건으로 단순화

This commit is contained in:
htlee 2026-03-19 11:49:38 +09:00
부모 a0b31b99e7
커밋 5a2675a1d5
2개의 변경된 파일3개의 추가작업 그리고 5개의 파일을 삭제

파일 보기

@ -118,8 +118,7 @@ public class OsintCollector {
if (articleUrl == null || title == null || title.isBlank()) continue;
if (osintFeedRepository.existsBySourceAndSourceUrl("gdelt", articleUrl)) continue;
if (osintFeedRepository.existsByRegionAndTitleAndCollectedAtAfter(
region, title, Instant.now().minus(24, ChronoUnit.HOURS))) continue;
if (osintFeedRepository.existsByTitle(title)) continue;
String seendate = article.path("seendate").asText(null);
Instant publishedAt = parseGdeltDate(seendate);
@ -184,8 +183,7 @@ public class OsintCollector {
if (link == null || title == null || title.isBlank()) continue;
if (osintFeedRepository.existsBySourceAndSourceUrl(sourceName, link)) continue;
if (osintFeedRepository.existsByRegionAndTitleAndCollectedAtAfter(
region, title, Instant.now().minus(24, ChronoUnit.HOURS))) continue;
if (osintFeedRepository.existsByTitle(title)) continue;
Instant publishedAt = parseRssDate(pubDate);

파일 보기

@ -9,7 +9,7 @@ public interface OsintFeedRepository extends JpaRepository<OsintFeed, Long> {
boolean existsBySourceAndSourceUrl(String source, String sourceUrl);
boolean existsByRegionAndTitleAndCollectedAtAfter(String region, String title, Instant since);
boolean existsByTitle(String title);
List<OsintFeed> findByRegionAndCollectedAtAfterOrderByPublishedAtDesc(String region, Instant since);
}