diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/EmptyRoomCleanTask.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/EmptyRoomCleanTask.java index 906f509b..bdb8901a 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/EmptyRoomCleanTask.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/EmptyRoomCleanTask.java @@ -9,6 +9,7 @@ import com.red.circle.other.infra.database.mongo.entity.live.ActiveVoiceRoom; import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; 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; @@ -22,6 +23,7 @@ import java.util.List; @Slf4j @Component @RequiredArgsConstructor +@ConditionalOnProperty(name = "scheduler.room-empty-clean", havingValue = "true", matchIfMissing = true) public class EmptyRoomCleanTask { private final ActiveVoiceRoomService activeVoiceRoomService; diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RoomRedPacketExpireTask.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RoomRedPacketExpireTask.java index 3238ec82..dd22f024 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RoomRedPacketExpireTask.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/scheduler/RoomRedPacketExpireTask.java @@ -14,6 +14,7 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.enums.GoldOrigin; 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.transaction.annotation.Transactional; @@ -27,6 +28,7 @@ import java.util.List; @Slf4j @Component @RequiredArgsConstructor +@ConditionalOnProperty(name = "scheduler.room-red-packet-expire", havingValue = "true", matchIfMissing = true) public class RoomRedPacketExpireTask { private final RoomRedPacketGateway roomRedPacketGateway;