diff --git a/Cargo.lock b/Cargo.lock index 25b09ed..9ca1b7e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -713,7 +713,6 @@ dependencies = [ [[package]] name = "emgauwa-common" version = "0.5.0" -source = "git+https://git.serguzim.me/emgauwa/common.git#b14049b3f6e8aa6a748e4d185bd52ca3f7a38f38" dependencies = [ "actix", "actix-web", diff --git a/src/main.rs b/src/main.rs index 003633f..d37a39c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,8 @@ async fn main() -> Result<(), std::io::Error> { init_logging(&settings.logging.level)?; - let pool = emgauwa_common::db::init(&settings.database).await?; + let pool_size = 10; + let pool = emgauwa_common::db::init(&settings.database, pool_size).await?; let mut conn = pool.acquire().await.map_err(EmgauwaError::from)?; DbController::all_inactive(&mut conn) @@ -112,6 +113,7 @@ async fn main() -> Result<(), std::io::Error> { .service(handlers::v1::ws::ws_relays), ) }) + .workers((pool_size / 2) as usize) .listen(listener)? .run() .await