refactor: better logging for sqlite pools

This commit is contained in:
Gauthier Roebroeck 2024-08-21 15:34:34 +08:00
parent f743aaef17
commit 6a51f3483a

View file

@ -17,11 +17,11 @@ class DataSourcesConfiguration(
@Bean("sqliteDataSource")
@Primary
fun sqliteDataSource(): DataSource =
buildDataSource("SqliteUdfPool", SqliteUdfDataSource::class.java, komgaProperties.database)
buildDataSource("SqliteMainPool", SqliteUdfDataSource::class.java, komgaProperties.database)
@Bean("tasksDataSource")
fun tasksDataSource(): DataSource =
buildDataSource("SqliteTaskPool", SQLiteDataSource::class.java, komgaProperties.tasksDb)
buildDataSource("SqliteTasksPool", SQLiteDataSource::class.java, komgaProperties.tasksDb)
.apply {
// force pool size to 1 for tasks datasource
this.maximumPoolSize = 1