Skip to content

Commit

Permalink
[hotfix] chore: 스케줄 이벤트가 제대로 작동하는지 확인하기 위한 로깅
Browse files Browse the repository at this point in the history
  • Loading branch information
jinkonu committed Jan 12, 2025
1 parent f76f71c commit ac19832
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@RequiredArgsConstructor
@Transactional(readOnly = true)
@Service
Expand Down Expand Up @@ -59,7 +61,8 @@ public PlaceGetResponse getDetailById(Long id) {
@Scheduled(cron = "0 0 * * * *")
@Transactional
public void cacheAll() {
placeRepository.findAll()
.forEach(placeRepository::cache);
List<Place> places = placeRepository.findAll();
System.out.println("places.size() = " + places.size());
places.forEach(placeRepository::cache);
}
}

0 comments on commit ac19832

Please sign in to comment.