mirror of
https://github.com/gotson/komga.git
synced 2025-01-09 04:08:00 +08:00
fix: add configuration to set the database pool size
This commit is contained in:
parent
c962f8a7ab
commit
76e624140d
@ -72,6 +72,9 @@ class KomgaProperties {
|
||||
@get:Positive
|
||||
var batchChunkSize: Int = 1000
|
||||
|
||||
@get:Positive
|
||||
var poolSize: Int? = null
|
||||
|
||||
@get:Positive
|
||||
var maxPoolSize: Int = 1
|
||||
|
||||
|
@ -37,6 +37,7 @@ class DataSourcesConfiguration(
|
||||
|
||||
val poolSize =
|
||||
if (komgaProperties.database.file.contains(":memory:")) 1
|
||||
else if (komgaProperties.database.poolSize != null) komgaProperties.database.poolSize!!
|
||||
else Runtime.getRuntime().availableProcessors().coerceAtMost(komgaProperties.database.maxPoolSize)
|
||||
|
||||
return HikariDataSource(
|
||||
|
Loading…
Reference in New Issue
Block a user