diff --git a/sql/src/mysql.rs b/sql/src/mysql.rs index 6dd24b8..a6393a5 100644 --- a/sql/src/mysql.rs +++ b/sql/src/mysql.rs @@ -1,5 +1,4 @@ use std::str::FromStr; -use std::time::Duration; use anyhow::Result; use sqlx::mysql::{MySqlConnectOptions, MySqlPoolOptions}; @@ -17,11 +16,7 @@ pub async fn connect( let options = MySqlConnectOptions::from_str(&url)? .disable_statement_logging() .clone(); - let pool = MySqlPoolOptions::new() - .acquire_timeout(Duration::from_secs(3)) - .max_connections(5) - .connect_with(options) - .await?; + let pool = MySqlPoolOptions::new().connect_with(options).await?; Ok(pool) } diff --git a/sql/src/postgres.rs b/sql/src/postgres.rs index 31aeefb..60dc0b3 100644 --- a/sql/src/postgres.rs +++ b/sql/src/postgres.rs @@ -1,5 +1,4 @@ use std::str::FromStr; -use std::time::Duration; use anyhow::Result; use sqlx::postgres::{PgConnectOptions, PgPoolOptions}; @@ -17,11 +16,7 @@ pub async fn connect( let options = PgConnectOptions::from_str(&url)? .disable_statement_logging() .clone(); - let pool = PgPoolOptions::new() - .acquire_timeout(Duration::from_secs(3)) - .max_connections(5) - .connect_with(options) - .await?; + let pool = PgPoolOptions::new().connect_with(options).await?; Ok(pool) } diff --git a/terraform/environments/redis/modules.tf b/terraform/environments/redis/modules.tf index c215cba..9fe2145 100644 --- a/terraform/environments/redis/modules.tf +++ b/terraform/environments/redis/modules.tf @@ -45,7 +45,7 @@ module "redis" { } module "sql_postgres" { - depends_on = [module.metrics, module.prometheus, module.postgresql, module.redis] + depends_on = [module.metrics, module.loki, module.postgresql, module.redis] source = "../../modules/sql" feature = "postgres" @@ -65,7 +65,7 @@ module "sql_postgres" { } module "sql_mysql" { - depends_on = [module.metrics, module.prometheus, module.mysql, module.redis] + depends_on = [module.metrics, module.loki, module.mysql, module.redis] source = "../../modules/sql" feature = "mysql"