Skip to content

Commit

Permalink
🔧 chore: 불필요한 import문, 주석 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jun02160 committed Apr 21, 2024
1 parent 0fc1a5b commit d7a8274
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,13 @@
import jakarta.persistence.PessimisticLockException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import sopt.org.motivoo.domain.mission.entity.CompletedStatus;
import sopt.org.motivoo.domain.mission.entity.Mission;
import sopt.org.motivoo.domain.mission.entity.MissionQuest;
import sopt.org.motivoo.domain.mission.entity.UserMission;
import sopt.org.motivoo.domain.mission.repository.MissionQuestRetriever;
import sopt.org.motivoo.domain.mission.repository.MissionRetriever;
import sopt.org.motivoo.domain.mission.repository.UserMissionChoicesRetriever;
import sopt.org.motivoo.domain.mission.repository.UserMissionRetriever;
import sopt.org.motivoo.domain.mission.service.UserMissionManager;
import sopt.org.motivoo.domain.user.entity.User;
import sopt.org.motivoo.domain.user.repository.UserRetriever;
import sopt.org.motivoo.external.s3.S3Service;
Expand All @@ -37,13 +34,10 @@
public class UserMissionScheduler {

private final UserMissionRetriever userMissionRetriever;
private final UserMissionChoicesRetriever userMissionChoicesRetriever;
private final UserRetriever userRetriever;
private final MissionRetriever missionRetriever;
private final MissionQuestRetriever missionQuestRetriever;

private final UserMissionManager userMissionManager;

private final S3Service s3Service;
private final PlatformTransactionManager transactionManager; // 수동 트랜잭션 처리를 위한 주입

Expand All @@ -53,7 +47,6 @@ public class UserMissionScheduler {

// 1. 미션 달성 상태 반영
@Scheduled(cron = "@daily", zone = "Asia/Seoul")
// @Scheduled(cron = "* */2 * * * *", zone = "Asia/Seoul")
public void setCompletedStatus() {
log.info("미션 달성상태 업데이트 스케줄러 진입");

Expand Down Expand Up @@ -104,8 +97,8 @@ public void setCompletedStatus() {

// 자정마다 오늘의 미션 초기값 bulk insert
@Scheduled(cron = "@daily", zone = "Asia/Seoul")
// @Scheduled(cron = "* */2 * * * *", zone = "Asia/Seoul")
public void insertEmptyUserMission() {
log.info("EmptyMission Bulk Insert");
List<User> users = userRetriever.findAll().stream()
.filter(user -> !user.isDeleted())
.filter(user -> user.getParentchild().isMatched()).toList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static sopt.org.motivoo.common.advice.CommonExceptionType.*;
import static sopt.org.motivoo.domain.mission.entity.CompletedStatus.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand All @@ -21,8 +20,6 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import sopt.org.motivoo.batch.service.firebase.UserStepManager;
import sopt.org.motivoo.domain.user.repository.UserRetriever;
import sopt.org.motivoo.external.firebase.FirebaseService;
import sopt.org.motivoo.common.advice.BusinessException;
import sopt.org.motivoo.domain.mission.entity.UserMission;
import sopt.org.motivoo.domain.mission.service.UserMissionService;
Expand All @@ -33,7 +30,6 @@
@RequiredArgsConstructor
public class UserStepScheduler {

private final FirebaseService firebaseService;
private final UserMissionService userMissionService;
private final UserStepManager userStepManager;

Expand Down

0 comments on commit d7a8274

Please sign in to comment.