Support alternative read-replica PgPool (#4374)

* Add ReadOnlyPgPool

* Clippy, fmt
This commit is contained in:
François-Xavier Talbot
2025-09-14 11:44:52 -04:00
committed by GitHub
parent 67e090565e
commit 3fc55184a7
8 changed files with 88 additions and 23 deletions

View File

@@ -83,7 +83,7 @@ async fn main() -> std::io::Result<()> {
}
// Database Connector
let pool = database::connect()
let (pool, ro_pool) = database::connect_all()
.await
.expect("Database connection failed");
@@ -167,6 +167,7 @@ async fn main() -> std::io::Result<()> {
let labrinth_config = labrinth::app_setup(
pool.clone(),
ro_pool.clone(),
redis_pool.clone(),
search_config.clone(),
&mut clickhouse,