From d139fff83c936b872b55f36756b800db1245f436 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 18 Aug 2024 03:05:43 +0900 Subject: [PATCH 1/3] =?UTF-8?q?RAC-419=20fix=20:=20=EB=B0=B0=EC=B9=98=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batch/scheduler/JobSchedulerConfig.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/postgraduate/batch/scheduler/JobSchedulerConfig.java b/src/main/java/com/postgraduate/batch/scheduler/JobSchedulerConfig.java index a2c675ac..8d1bb716 100644 --- a/src/main/java/com/postgraduate/batch/scheduler/JobSchedulerConfig.java +++ b/src/main/java/com/postgraduate/batch/scheduler/JobSchedulerConfig.java @@ -27,6 +27,8 @@ public class JobSchedulerConfig { private final Job doneJob; @Qualifier("salaryJob") private final Job salaryJob; + @Qualifier("salaryJobWithAdmin") + private final Job salaryJobWithAdmin; @Scheduled(cron = "0 59 23 * * *", zone = "Asia/Seoul") public void launchCancelJob() throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { @@ -36,7 +38,7 @@ public void launchCancelJob() throws JobInstanceAlreadyCompleteException, JobExe jobLauncher.run(cancelJob, jobParameters); } - @Scheduled(cron = "0 59 23 * * *", zone = "Asia/Seoul") + @Scheduled(cron = "0 58 23 * * *", zone = "Asia/Seoul") public void launchDoneJob() throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { JobParameters jobParameters = new JobParametersBuilder() .addLocalDateTime("date", LocalDateTime.now()) @@ -44,11 +46,18 @@ public void launchDoneJob() throws JobInstanceAlreadyCompleteException, JobExecu jobLauncher.run(doneJob, jobParameters); } - @Scheduled(cron = "0 0 0 * * 4", zone = "Asia/Seoul") + @Scheduled(cron = "0 10 0 * * 4", zone = "Asia/Seoul") public void launchSalaryJob() throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { JobParameters jobParameters = new JobParametersBuilder() .addLocalDateTime("date", LocalDateTime.now()) .toJobParameters(); jobLauncher.run(salaryJob, jobParameters); } + + public void launchSalaryJobWithAdmin() throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException { + JobParameters jobParameters = new JobParametersBuilder() + .addLocalDateTime("date", LocalDateTime.now()) + .toJobParameters(); + jobLauncher.run(salaryJobWithAdmin, jobParameters); + } } From 3486aa7d06b25a6c7a9e6778686dd202936244d0 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 18 Aug 2024 03:06:06 +0900 Subject: [PATCH 2/3] =?UTF-8?q?RAC-419=20fix=20:=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A0=95=EC=82=B0=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=8B=9C=20=EC=8A=AC=EB=9E=99=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/application/usecase/AdminBatchUseCase.java | 2 +- .../postgraduate/batch/salary/CreateSalaryJobConfig.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/postgraduate/admin/application/usecase/AdminBatchUseCase.java b/src/main/java/com/postgraduate/admin/application/usecase/AdminBatchUseCase.java index 04aff989..ff3d6c1a 100644 --- a/src/main/java/com/postgraduate/admin/application/usecase/AdminBatchUseCase.java +++ b/src/main/java/com/postgraduate/admin/application/usecase/AdminBatchUseCase.java @@ -13,7 +13,7 @@ public class AdminBatchUseCase { public void startSalaryBatch() { try { - jobSchedulerConfig.launchSalaryJob(); + jobSchedulerConfig.launchSalaryJobWithAdmin(); } catch (Exception e) { log.error("Create Salary Batch Exception : {}", e.getStackTrace()); } diff --git a/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java b/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java index b129cf5e..10432bb7 100644 --- a/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java +++ b/src/main/java/com/postgraduate/batch/salary/CreateSalaryJobConfig.java @@ -50,6 +50,13 @@ public Job salaryJob() { .build(); } + @Bean(name = "salaryJobWithAdmin") + public Job salaryJobWithAdmin() { + return new JobBuilder("salaryJobWithAdmin", jobRepository) + .start(createSalaryStep()) + .build(); + } + @Bean(name = "sendSlackStep") public Step sendSlackStep() { return new StepBuilder("sendSlackStep", jobRepository) From e4be6f5da2a180c06daa7e108669e8bbbe388957 Mon Sep 17 00:00:00 2001 From: yang Date: Sun, 18 Aug 2024 03:11:37 +0900 Subject: [PATCH 3/3] =?UTF-8?q?RAC-419=20fix=20:=20=EB=B6=88=ED=95=84?= =?UTF-8?q?=EC=9A=94=ED=95=9C=20=EB=A1=9C=EA=B7=B8=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/usecase/oauth/kakao/KakaoSignInUseCase.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoSignInUseCase.java b/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoSignInUseCase.java index b7188a12..e818c0d1 100644 --- a/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoSignInUseCase.java +++ b/src/main/java/com/postgraduate/domain/auth/application/usecase/oauth/kakao/KakaoSignInUseCase.java @@ -13,14 +13,12 @@ import com.postgraduate.domain.user.user.exception.UserNotFoundException; import jakarta.validation.constraints.NotNull; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @RequiredArgsConstructor @Transactional -@Slf4j public class KakaoSignInUseCase implements SignInUseCase { private final KakaoAccessTokenUseCase kakaoTokenUseCase; private final UserGetService userGetService; @@ -41,7 +39,6 @@ public AuthUserResponse getDevUser(CodeRequest codeRequest) { @Override public AuthUserResponse getUserWithToken(TokenRequest request) { KakaoUserInfoResponse userInfo = kakaoTokenUseCase.getUserInfo(request.accessToken()); - log.info("user : {}", userInfo.id()); return getAuthUserResponse(userInfo); } @@ -50,7 +47,6 @@ private AuthUserResponse getAuthUserResponse(KakaoUserInfoResponse userInfo) { Long socialId = userInfo.id(); try { User user = userGetService.bySocialId(socialId); - log.info("check user {} ", user.getUserId()); checkDelete(user); return AuthMapper.mapToAuthUser(user, socialId); } catch (UserNotFoundException e) {