fix(osiv): lazy 관계 선로딩을 보완한다

This commit is contained in:
2026-06-20 00:05:48 +09:00
parent 92fe6caf17
commit 37ad325cc2
7 changed files with 532 additions and 14 deletions

View File

@@ -2,12 +2,14 @@ package kr.co.vividnext.sodalive.i18n.translation
import kr.co.vividnext.sodalive.i18n.translation.PapagoTranslationService.Companion.getTranslatableLanguageCodes
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
@Service
class ResourceTranslationJobScheduler(
private val sourceExtractor: TranslationSourceExtractor,
private val translationJobScheduler: TranslationJobScheduler
) {
@Transactional
fun scheduleResourceTranslations(resourceType: LanguageTranslationTargetType, resourceId: Long) {
val source = sourceExtractor.extract(resourceType, resourceId) ?: return
getTranslatableLanguageCodes(source.sourceLanguage).forEach { targetLanguage ->
@@ -15,6 +17,7 @@ class ResourceTranslationJobScheduler(
}
}
@Transactional
fun scheduleResourceTranslation(
resourceType: LanguageTranslationTargetType,
resourceId: Long,