From c655584da90e01852d5689da08950d8626e78f88 Mon Sep 17 00:00:00 2001 From: pywoo Date: Mon, 18 Aug 2025 17:36:40 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=EC=96=91=20=EB=81=9D?= =?UTF-8?q?=20=EB=82=A0=EC=A7=9C=EA=B0=80=20=ED=8F=AC=ED=95=A8=EB=90=98?= =?UTF-8?q?=EC=96=B4=20=EC=A1=B0=ED=9A=8C=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../placecategorylog/repository/PlaceCategoryLogRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/repository/PlaceCategoryLogRepository.java b/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/repository/PlaceCategoryLogRepository.java index cba6ae0..868ee64 100644 --- a/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/repository/PlaceCategoryLogRepository.java +++ b/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/repository/PlaceCategoryLogRepository.java @@ -4,9 +4,11 @@ import java.util.List; import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; import org.withtime.be.withtimebe.domain.log.placecategorylog.model.PlaceCategoryLog; public interface PlaceCategoryLogRepository extends MongoRepository { + @Query("{ 'date': { $gte: ?0, $lte: ?1 } }") List findByDateBetween(LocalDate startDate, LocalDate endDate); List findByDateAndPlaceCategoryLabelIn(LocalDate date, List placeCategoryLabel); } From 52cfd4fe7b33d1b9c26e7e038ce86fa81e8f42b7 Mon Sep 17 00:00:00 2001 From: pywoo Date: Mon, 18 Aug 2025 17:37:24 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20fix:=203=EB=B6=84=EB=A7=88?= =?UTF-8?q?=EB=8B=A4=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EB=8F=99=EA=B8=B0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../placecategorylog/scheduler/PlaceCategoryLogScheduler.java | 1 - src/main/resources/application.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/scheduler/PlaceCategoryLogScheduler.java b/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/scheduler/PlaceCategoryLogScheduler.java index 19203a0..ccfa9cd 100644 --- a/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/scheduler/PlaceCategoryLogScheduler.java +++ b/src/main/java/org/withtime/be/withtimebe/domain/log/placecategorylog/scheduler/PlaceCategoryLogScheduler.java @@ -42,7 +42,6 @@ public class PlaceCategoryLogScheduler { cacheManager = "redisCacheManager", beforeInvocation = false ) - @Scheduled(cron = "${scheduler.logs.place-category.sync-cron}") // 매 5분마다 public void syncUserPreferredKeywordsToDB() { log.info("[PlaceCategoryLogScheduler] 동기화 스케쥴러 동작"); diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f22e129..1f046c7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -146,7 +146,7 @@ scheduler: logs: place-category: enabled: true - sync-cron: "0 */5 * * * *" # 5분마다 Redis -> Mongo 동기화 + sync-cron: "0 */3 * * * *" # 5분마다 Redis -> Mongo 동기화 date-place: enabled: true sync-cron: "0 0 0 * * *" # 매일 자정마다 동기화