This repository was archived by the owner on Oct 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
[#46] 비동기적인 Push 알람 서비스 구현 #48
Open
tjdrnr0557
wants to merge
14
commits into
develop
Choose a base branch
from
feature/46
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8108c9c
푸쉬 알람 서비스 초기 환결설정
tjdrnr0557 f91e91e
라이더 토큰 추가
tjdrnr0557 6252939
Async를 위한 스레드 풀 초기 설정
tjdrnr0557 63e9b35
주문 승인 시 대기중인 라이더들에게 푸쉬 알람 전송 기능 추가
tjdrnr0557 4451c96
git ignore 추가
tjdrnr0557 dd0fcde
캐시 삭제
tjdrnr0557 f45050a
[#47] 리뷰 반영
tjdrnr0557 631569a
[#47] 리뷰 반영
tjdrnr0557 6e14c40
[#47] 리뷰 반영
tjdrnr0557 c6280de
[#47] 리뷰 반영
tjdrnr0557 1c5b247
[#47] 리뷰 반영
tjdrnr0557 3ece9d5
[#47] 리뷰 반영
tjdrnr0557 a1d3104
[#47] 리뷰 반영
tjdrnr0557 71c41a2
어플리케이션 레벨에서 비동기를 구현하여 푸쉬메세지 전송
tjdrnr0557 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,7 @@ public void init() throws IOException { | |
| } | ||
|
|
||
| public void sendMessageToStandbyRidersInSameArea(String address, PushMessageDTO pushMessage) | ||
| throws FirebaseMessagingException { | ||
| throws IOException { | ||
| Set<String> tokenSet = deliveryDAO.selectStandbyRiderTokenList(address); | ||
| List<Message> messages = tokenSet.stream().map(token -> Message.builder() | ||
| .putData("title", pushMessage.getTitle()) | ||
|
|
@@ -57,8 +57,11 @@ public void sendMessageToStandbyRidersInSameArea(String address, PushMessageDTO | |
| .setToken(token) | ||
| .build()) | ||
| .collect(Collectors.toList()); | ||
|
|
||
| FirebaseMessaging.getInstance().sendAll(messages); | ||
| try { | ||
| FirebaseMessaging.getInstance().sendAll(messages); | ||
| } catch (FirebaseMessagingException e) { | ||
| throw new IOException(e); | ||
|
||
| } | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다시 보니 이 클래스의 이름은
PushService인데 메소드 이름에StandbyRidersInSameArea가 붙어있습니다. 순수하게 푸시 로직만 들어있는게 아니라 라이더 관련 책임도 들어있네요. 그러면 두 책임간의 결합도가 높은게 아닐까요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
도메인 관계를 잘못 설정하고 있었네요. RiderService가 Pushservice에 의존하여 메세지를 보내게 변경하였습니다.