diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RocketStatusSyncTask.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RocketStatusSyncTask.java index 57c1a5f4..9e0d2bb1 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RocketStatusSyncTask.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RocketStatusSyncTask.java @@ -10,6 +10,7 @@ import com.red.circle.other.domain.rocket.RocketStatus; import com.red.circle.tool.core.date.ZonedDateTimeAsiaRiyadhUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -24,6 +25,7 @@ import java.util.List; @Slf4j @Component @RequiredArgsConstructor +@ConditionalOnProperty(name = "scheduler.rocket-status-sync", havingValue = "true", matchIfMissing = true) public class RocketStatusSyncTask { private final RocketStatusGateway rocketStatusGateway; diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/cp/CpRankingBadgeTask.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/cp/CpRankingBadgeTask.java index 27e6147c..e1fd0f4a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/cp/CpRankingBadgeTask.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/cp/CpRankingBadgeTask.java @@ -16,6 +16,7 @@ import com.red.circle.tool.core.date.TimestampUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.tuple.ImmutablePair; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -25,6 +26,7 @@ import java.util.stream.Collectors; @Slf4j @Component @RequiredArgsConstructor +@ConditionalOnProperty(name = "scheduler.cp-ranking-badge", havingValue = "true", matchIfMissing = true) public class CpRankingBadgeTask { private final WeekCpValueCountService weekCpValueCountService;