mirror of
https://github.com/gotson/komga.git
synced 2025-12-21 16:03:03 +01:00
fix(tasks): background tasks would stop running if disk is over 90% full
This commit is contained in:
parent
ff55c84f8e
commit
dc33fb1d10
1 changed files with 4 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import org.apache.activemq.artemis.core.config.CoreQueueConfiguration
|
|||
import org.apache.activemq.artemis.core.settings.impl.AddressSettings
|
||||
import org.springframework.boot.autoconfigure.jms.artemis.ArtemisConfigurationCustomizer
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.apache.activemq.artemis.core.config.Configuration as ArtemisConfiguration
|
||||
|
||||
const val QUEUE_UNIQUE_ID = "unique_id"
|
||||
const val QUEUE_TYPE = "type"
|
||||
|
|
@ -14,8 +15,10 @@ const val QUEUE_TASKS_SELECTOR = "$QUEUE_TYPE = '$QUEUE_TASKS_TYPE'"
|
|||
|
||||
@Configuration
|
||||
class ArtemisConfig : ArtemisConfigurationCustomizer {
|
||||
override fun customize(configuration: org.apache.activemq.artemis.core.config.Configuration?) {
|
||||
override fun customize(configuration: ArtemisConfiguration?) {
|
||||
configuration?.let {
|
||||
// default is 90, meaning the queue would block if disk is 90% full. Set it to 100 to avoid blocking.
|
||||
it.maxDiskUsage = 100
|
||||
// disable prefetch, ensures messages stay in the queue and last value can have desired effect
|
||||
it.addAddressesSetting(QUEUE_TASKS, AddressSettings().apply {
|
||||
defaultConsumerWindowSize = 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue