Skip to content

Commit

Permalink
fix: OSIV false 설정으로 인한 스케줄링 메서드 트랜잭션 선언
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeon0208 committed Sep 26, 2024
1 parent 651acc0 commit a6c7ad4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
compileOnly 'org.projectlombok:lombok'

implementation "org.flywaydb:flyway-mysql"
implementation "org.flywaydb:flyway-core"
implementation 'org.flywaydb:flyway-mysql'
implementation 'org.flywaydb:flyway-core'
}

tasks.named('test') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void scheduleNotification(FcmGroupSendRequest fcmGroupSendRequest) {
);
}

@Transactional
@EventListener(ApplicationReadyEvent.class)
public void schedulePendingNotification() {
List<Notification> notifications = notificationRepository.findAllByTypeAndStatus(
Expand All @@ -92,7 +93,10 @@ public void schedulePendingNotification() {

@DisabledDeletedFilter
public NotiLogFindResponses findAllMeetingLogs(Long meetingId) {
List<Notification> notifications = notificationRepository.findAllMeetingLogsBeforeThanEqual(meetingId, LocalDateTime.now());
List<Notification> notifications = notificationRepository.findAllMeetingLogsBeforeThanEqual(
meetingId,
LocalDateTime.now()
);
return NotiLogFindResponses.from(notifications);
}

Expand Down

0 comments on commit a6c7ad4

Please sign in to comment.