From 6dc6a0ecd3f07fb3294e043aa73ce63ef3078ad2 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Wed, 4 Oct 2023 00:53:17 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20mongo-db=E3=82=92=E9=81=B8=E6=8A=9E?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=82=82=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C?= =?UTF-8?q?=E5=87=BA=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../usbharu/hideout/service/job/KJobJobQueueParentService.kt | 2 +- .../usbharu/hideout/service/job/KJobJobQueueWorkerService.kt | 2 +- .../hideout/service/job/KJobMongoJobQueueWorkerService.kt | 2 +- .../hideout/service/job/KjobMongoJobQueueParentService.kt | 2 +- .../hideout/service/post/MongoGenerateTimelineService.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueParentService.kt b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueParentService.kt index 72456c1a..6b2841d1 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueParentService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueParentService.kt @@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.stereotype.Service @Service -@ConditionalOnProperty(name = ["hideout.job-queue.type"], havingValue = "rdb") +@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "false", matchIfMissing = true) class KJobJobQueueParentService(private val database: Database) : JobQueueParentService { private val logger = LoggerFactory.getLogger(this::class.java) diff --git a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueWorkerService.kt b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueWorkerService.kt index 7db86934..e355b388 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueWorkerService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobJobQueueWorkerService.kt @@ -11,7 +11,7 @@ import dev.usbharu.hideout.domain.model.job.HideoutJob as HJ import kjob.core.dsl.JobContextWithProps as JCWP @Service -@ConditionalOnProperty(name = ["hideout.job-queue.type"], havingValue = "rdb", matchIfMissing = true) +@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "false", matchIfMissing = true) class KJobJobQueueWorkerService(private val database: Database) : JobQueueWorkerService { val kjob by lazy { diff --git a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobMongoJobQueueWorkerService.kt b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobMongoJobQueueWorkerService.kt index 78ddff9f..7ac05da6 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/job/KJobMongoJobQueueWorkerService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/job/KJobMongoJobQueueWorkerService.kt @@ -10,7 +10,7 @@ import dev.usbharu.hideout.domain.model.job.HideoutJob as HJ import kjob.core.dsl.JobContextWithProps as JCWP @Service -@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "", matchIfMissing = false) +@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "true", matchIfMissing = false) class KJobMongoJobQueueWorkerService : JobQueueWorkerService { val kjob by lazy { kjob(Mongo) { diff --git a/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt b/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt index 46f0b1c4..a2819257 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.stereotype.Service @Service -@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "", matchIfMissing = false) +@ConditionalOnProperty(name = ["hideout.use-mongodb"], havingValue = "true", matchIfMissing = false) class KjobMongoJobQueueParentService : JobQueueParentService { private val kjob = kjob(Mongo) { connectionString = "mongodb://localhost" diff --git a/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt b/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt index f918f960..098e17ca 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/post/MongoGenerateTimelineService.kt @@ -10,7 +10,7 @@ import org.springframework.data.mongodb.core.query.Query import org.springframework.stereotype.Service @Service -@ConditionalOnProperty("hideout.use-mongodb", havingValue = "", matchIfMissing = false) +@ConditionalOnProperty("hideout.use-mongodb", havingValue = "true", matchIfMissing = false) class MongoGenerateTimelineService( private val statusQueryService: StatusQueryService, private val mongoTemplate: MongoTemplate