refactor(komga): remove artemis cleanup

This commit is contained in:
Gauthier Roebroeck 2025-07-15 13:24:14 +08:00
parent 48207cb712
commit 9567df1cae
4 changed files with 0 additions and 44 deletions

View file

@ -21,9 +21,6 @@ komga:
spring:
flyway:
enabled: true
artemis:
embedded:
data-directory: \${komga.config-dir}/artemis/\${komga.workspace}
#logging:
# level:
# root: ERROR

View file

@ -1,31 +0,0 @@
package org.gotson.komga.infrastructure.jms
import io.github.oshai.kotlinlogging.KotlinLogging
import org.springframework.beans.factory.InitializingBean
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service
import org.springframework.util.FileSystemUtils
import java.nio.file.Path
import kotlin.io.path.isDirectory
private val logger = KotlinLogging.logger {}
@Service
@Deprecated("To be removed")
class ArtemisCleanup(
@Value("\${spring.artemis.embedded.data-directory}") private val artemisDataDir: String? = null,
) : InitializingBean {
override fun afterPropertiesSet() {
try {
artemisDataDir?.let {
val artemisDataPath = Path.of(it)
if (artemisDataPath.isDirectory()) {
logger.info { "Deleting the legacy Artemis data-directory: $artemisDataPath" }
FileSystemUtils.deleteRecursively(artemisDataPath)
}
}
} catch (e: Exception) {
logger.warn(e) { "Failed to cleanup the Artemis directory" }
}
}
}

View file

@ -6,7 +6,3 @@ komga:
data-directory: \${komga.config-dir}/lucene/\${komga.workspace}
tasks-db:
file: \${komga.config-dir}/\${komga.workspace}-tasks.sqlite
spring:
artemis:
embedded:
data-directory: \${komga.config-dir}/artemis/\${komga.workspace}

View file

@ -42,12 +42,6 @@ spring:
mvc:
async:
request-timeout: 1h
# Deprecated - to remove along with ArtemisCleanup.kt
artemis:
broker-url: tcp://localhost:18515
embedded:
persistent: true
data-directory: \${komga.config-dir}/artemis
web:
resources:
add-mappings: false