From e11872aac53a1fdd4fbe3c27174c7652e42a0d15 Mon Sep 17 00:00:00 2001 From: usbharu Date: Thu, 16 Nov 2023 23:38:24 +0900 Subject: [PATCH] Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../exposedrepository/ExposedTimelineRepository.kt | 1 - .../infrastructure/kjobexposed/KJobJobQueueParentService.kt | 4 ++-- .../core/service/timeline/ExposedGenerateTimelineService.kt | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt b/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt index 21865a35..ee372e1c 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/exposedrepository/ExposedTimelineRepository.kt @@ -46,7 +46,6 @@ class ExposedTimelineRepository(private val idGenerateService: IdGenerateService it[isLocal] = timeline.isLocal it[isPureRepost] = timeline.isPureRepost it[mediaIds] = timeline.mediaIds.joinToString(",") - } } return timeline diff --git a/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/kjobexposed/KJobJobQueueParentService.kt b/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/kjobexposed/KJobJobQueueParentService.kt index cc68d15c..0e02b011 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/kjobexposed/KJobJobQueueParentService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/infrastructure/kjobexposed/KJobJobQueueParentService.kt @@ -19,8 +19,8 @@ class KJobJobQueueParentService() : JobQueueParentService { val kjob: KJob by lazy { kjob(ExposedKJob) { connectionDatabase = TransactionManager.defaultDatabase - isWorker = false - }.start() + isWorker = false + }.start() } override fun init(jobDefines: List) = Unit diff --git a/src/main/kotlin/dev/usbharu/hideout/core/service/timeline/ExposedGenerateTimelineService.kt b/src/main/kotlin/dev/usbharu/hideout/core/service/timeline/ExposedGenerateTimelineService.kt index 5989c3e4..5fc098b2 100644 --- a/src/main/kotlin/dev/usbharu/hideout/core/service/timeline/ExposedGenerateTimelineService.kt +++ b/src/main/kotlin/dev/usbharu/hideout/core/service/timeline/ExposedGenerateTimelineService.kt @@ -45,7 +45,8 @@ class ExposedGenerateTimelineService(private val statusQueryService: StatusQuery it[Timelines.postId], it[Timelines.replyId], it[Timelines.repostId], - it[Timelines.mediaIds].split(",").mapNotNull { it.toLongOrNull() }) + it[Timelines.mediaIds].split(",").mapNotNull { it.toLongOrNull() } + ) } return statusQueryService.findByPostIdsWithMediaIds(statusQueries)