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) }