Skip to content

Commit

Permalink
refactor: 사용하지 않는 이벤트 리스너 및 이벤트 객체 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim0914 committed Jan 22, 2024
1 parent 9fd8bdf commit a69624d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.official.pium.notification.application;

import com.official.pium.petPlant.event.notification.NotificationEvent;
import com.official.pium.petPlant.event.notification.NotificationEvents;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
Expand All @@ -22,14 +21,4 @@ public void handleNotificationEvent(NotificationEvent event) {
notificationService.sendNotification(event.getDeviceToken(), event.getTitle(), event.getBody());
log.info("비동기 알림 END, Thread: " + Thread.currentThread().getId() + " " + Thread.currentThread().getName());
}

@EventListener
@Async
public void handleNotificationEvents(NotificationEvents notificationEvents) {
log.info("동기 알림 START, Thread: " + Thread.currentThread().getId() + " " + Thread.currentThread().getName());
for (NotificationEvent event : notificationEvents.getNotificationEvents()) {
notificationService.sendNotification(event.getDeviceToken(), event.getTitle(), event.getBody());
}
log.info("동기 알림 END, Thread: " + Thread.currentThread().getId() + " " + Thread.currentThread().getName());
}
}

This file was deleted.

0 comments on commit a69624d

Please sign in to comment.