From 6b80c387fe2874c6de8265edae3b1a5126b74da5 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Sat, 30 Sep 2023 13:59:45 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=8F=E3=81=9D=E3=81=A3=E3=81=9F=E3=82=8CLi?= =?UTF-8?q?nt=E3=82=92=E9=BB=99=E3=82=89=E3=81=9B=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- detekt.yml | 3 +++ .../hideout/service/job/KjobMongoJobQueueParentService.kt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/detekt.yml b/detekt.yml index 21fab9ff..26af6de1 100644 --- a/detekt.yml +++ b/detekt.yml @@ -157,3 +157,6 @@ potential-bugs: ElseCaseInsteadOfExhaustiveWhen: active: true + + HasPlatformType: + active: false 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 f76e7e18..c532d2e2 100644 --- a/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/service/job/KjobMongoJobQueueParentService.kt @@ -10,8 +10,6 @@ import org.springframework.stereotype.Service @Service @ConditionalOnProperty(name = ["hideout.job-queue.type"], havingValue = "nosql") class KjobMongoJobQueueParentService : JobQueueParentService { - override fun init(jobDefines: List) = Unit - private val kjob = kjob(Mongo) { connectionString = "mongodb://localhost" databaseName = "kjob" @@ -21,6 +19,8 @@ class KjobMongoJobQueueParentService : JobQueueParentService { isWorker = false }.start() + override fun init(jobDefines: List) = Unit + override suspend fun schedule(job: J, block: ScheduleContext.(J) -> Unit) { kjob.schedule(job, block) }