mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 16:42:24 +01:00
refactor(komga): remove artemis cleanup
This commit is contained in:
parent
48207cb712
commit
9567df1cae
4 changed files with 0 additions and 44 deletions
|
|
@ -21,9 +21,6 @@ komga:
|
||||||
spring:
|
spring:
|
||||||
flyway:
|
flyway:
|
||||||
enabled: true
|
enabled: true
|
||||||
artemis:
|
|
||||||
embedded:
|
|
||||||
data-directory: \${komga.config-dir}/artemis/\${komga.workspace}
|
|
||||||
#logging:
|
#logging:
|
||||||
# level:
|
# level:
|
||||||
# root: ERROR
|
# root: ERROR
|
||||||
|
|
|
||||||
|
|
@ -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" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,7 +6,3 @@ komga:
|
||||||
data-directory: \${komga.config-dir}/lucene/\${komga.workspace}
|
data-directory: \${komga.config-dir}/lucene/\${komga.workspace}
|
||||||
tasks-db:
|
tasks-db:
|
||||||
file: \${komga.config-dir}/\${komga.workspace}-tasks.sqlite
|
file: \${komga.config-dir}/\${komga.workspace}-tasks.sqlite
|
||||||
spring:
|
|
||||||
artemis:
|
|
||||||
embedded:
|
|
||||||
data-directory: \${komga.config-dir}/artemis/\${komga.workspace}
|
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,6 @@ spring:
|
||||||
mvc:
|
mvc:
|
||||||
async:
|
async:
|
||||||
request-timeout: 1h
|
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:
|
web:
|
||||||
resources:
|
resources:
|
||||||
add-mappings: false
|
add-mappings: false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue