-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 스케줄러 configuration을 추가한다. 기존 스케줄러에서 `@Component` 제거 및 수동 빈 등록으로 변경, 테스트 환경 비활성화를 위한 설정을 추가함. * test: 스케줄러 테스트를 제거한다. * fix: `Recruitment` 엔티티 필드 `RecruitmentApplicantCount`에 `@Embedded`를 추가한다.
- Loading branch information
1 parent
80591cd
commit ac77a50
Showing
11 changed files
with
40 additions
and
135 deletions.
There are no files selected for viewing
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
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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/clova/anifriends/global/config/SchedulerConfig.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.clova.anifriends.global.config; | ||
|
||
import com.clova.anifriends.domain.notification.service.ShelterNotificationService; | ||
import com.clova.anifriends.domain.notification.service.VolunteerNotificationService; | ||
import com.clova.anifriends.domain.recruitment.service.RecruitmentService; | ||
import com.clova.anifriends.global.scheduler.NotifyScheduler; | ||
import com.clova.anifriends.global.scheduler.ServiceScheduler; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
|
||
@ConditionalOnProperty( | ||
value = "scheduler.enabled", havingValue = "true", matchIfMissing = true | ||
) | ||
@EnableScheduling | ||
@Configuration | ||
public class SchedulerConfig { | ||
|
||
@Bean | ||
public NotifyScheduler notifyScheduler( | ||
VolunteerNotificationService volunteerNotificationService, | ||
ShelterNotificationService shelterNotificationService | ||
) { | ||
return new NotifyScheduler(volunteerNotificationService, shelterNotificationService); | ||
} | ||
|
||
@Bean | ||
public ServiceScheduler serviceScheduler(RecruitmentService recruitmentService) { | ||
return new ServiceScheduler(recruitmentService); | ||
} | ||
} |
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
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
43 changes: 0 additions & 43 deletions
43
src/test/java/com/clova/anifriends/base/BaseSchedulerTest.java
This file was deleted.
Oops, something went wrong.
57 changes: 0 additions & 57 deletions
57
src/test/java/com/clova/anifriends/global/scheduler/NotifySchedulerTest.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
src/test/java/com/clova/anifriends/global/scheduler/ServiceSchedulerTest.java
This file was deleted.
Oops, something went wrong.
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