-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 비동기 처리용 Executor 분리, Firebase ThreadPool 커스텀, 알림 재전송 실패 로직 …
…추가, 콜백 메소드를 활용한 Non-Blocking 처리 (#501) * chore: 테스트 메서드 주석 해제 * fix: 이벤트 발행 인자 객체 수정 * feat: Listener를 이용해 블락킹 요소 제거 * feat: 알림 실패 시 재시도 로직 추가 * feat: firebase SDK 내부에서 사용하는 스레드 풀 설정 * feat: 스레드 풀 분리에 따른 빈 이름 명시 * style: 컨벤션에 맞도록 코드 수정 * chore: CustomThreadManager 패키지 분리 * chore: 테스트 API 비공개 처리 * docs: fcm docs java doc 추가 --------- Co-authored-by: DongUk <[email protected]>
- Loading branch information
1 parent
04f7066
commit 3ad217b
Showing
44 changed files
with
267 additions
and
168 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
backend/pium/src/main/java/com/official/pium/admin/service/AdminService.java
This file contains 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
8 changes: 4 additions & 4 deletions
8
backend/pium/src/main/java/com/official/pium/admin/service/RegistrationService.java
This file contains 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 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
6 changes: 3 additions & 3 deletions
6
backend/pium/src/main/java/com/official/pium/admin/ui/RegistrationController.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
backend/pium/src/main/java/com/official/pium/common/ui/MemberArgumentResolver.java
This file contains 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
5 changes: 2 additions & 3 deletions
5
backend/pium/src/main/java/com/official/pium/common/util/PhotoLocalManager.java
This file contains 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
19 changes: 14 additions & 5 deletions
19
backend/pium/src/main/java/com/official/pium/config/AsyncConfig.java
This file contains 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 |
---|---|---|
@@ -1,21 +1,30 @@ | ||
package com.official.pium.config; | ||
|
||
import java.util.concurrent.Executor; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.scheduling.annotation.AsyncConfigurer; | ||
import org.springframework.core.task.TaskExecutor; | ||
import org.springframework.scheduling.annotation.EnableAsync; | ||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; | ||
|
||
@Configuration | ||
@EnableAsync | ||
public class AsyncConfig implements AsyncConfigurer { | ||
public class AsyncConfig { | ||
|
||
@Override | ||
public Executor getAsyncExecutor() { | ||
@Bean("notificationAsyncExecutor") | ||
public TaskExecutor getAsyncExecutor() { | ||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
executor.setCorePoolSize(40); | ||
executor.setThreadNamePrefix("2024-Pium-Thread: "); | ||
executor.initialize(); | ||
return executor; | ||
} | ||
|
||
@Bean("notificationCallBackExecutor") | ||
public TaskExecutor getCallBackExecutor() { | ||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); | ||
executor.setCorePoolSize(10); | ||
executor.setThreadNamePrefix("2024-Pium-Call-Back-Thread: "); | ||
executor.initialize(); | ||
return executor; | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...m/src/main/java/com/official/pium/dictionaryPlant/application/DictionaryPlantService.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
.../java/com/official/pium/dictionaryPlant/application/dto/DictionaryPlantCreateRequest.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
.../java/com/official/pium/dictionaryPlant/application/dto/DictionaryPlantUpdateRequest.java
This file contains 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 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
8 changes: 4 additions & 4 deletions
8
backend/pium/src/main/java/com/official/pium/garden/application/GardenService.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
backend/pium/src/main/java/com/official/pium/garden/application/dto/GardenCreateRequest.java
This file contains 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 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
4 changes: 2 additions & 2 deletions
4
backend/pium/src/main/java/com/official/pium/garden/ui/GardenController.java
This file contains 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
10 changes: 5 additions & 5 deletions
10
backend/pium/src/main/java/com/official/pium/history/application/HistoryEventListener.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
backend/pium/src/main/java/com/official/pium/history/application/HistoryService.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
backend/pium/src/main/java/com/official/pium/history/domain/History.java
This file contains 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 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
4 changes: 2 additions & 2 deletions
4
backend/pium/src/main/java/com/official/pium/member/application/AuthService.java
This file contains 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
Oops, something went wrong.