Skip to content

Commit

Permalink
Hotfix: 노래 캐싱 로그 추가 및 스냅샷 최신화 (#450)
Browse files Browse the repository at this point in the history
* fix: InMemorySongsScheduler 스냅샷 최신화 및 로그 설정

* fix: 노래 캐시 스케줄러 로깅 추가
  • Loading branch information
somsom13 authored Sep 22, 2023
1 parent cdf46ea commit 21f7ec1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -10,6 +11,7 @@

@RequiredArgsConstructor
@Transactional(readOnly = true)
@Slf4j
@Component
public class InMemorySongsScheduler {

Expand All @@ -23,6 +25,7 @@ public void initialize() {

@Scheduled(cron = "${schedules.in-memory-song.cron}")
public void recreateCachedSong() {
log.info("InMemorySongsScheduler worked");
inMemorySongs.recreate(songRepository.findAllWithKillingParts());
}
}
2 changes: 1 addition & 1 deletion backend/src/main/resources/shook-security

0 comments on commit 21f7ec1

Please sign in to comment.