fix: mongo-dbを選択してもエラーが出ていたのを修正

This commit is contained in:
usbharu 2023-10-04 00:53:17 +09:00
parent f6c25d77d3
commit 6dc6a0ecd3
5 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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 {

View File

@ -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) {

View File

@ -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"

View File

@ -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