From d1ab09999f512009f5ba4d9905330b7ac3ae15ee Mon Sep 17 00:00:00 2001 From: dal Date: Mon, 21 Jul 2025 15:46:43 -0600 Subject: [PATCH] update so rust build works --- .../data_source_connections/get_redshift_connection.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/api/libs/query_engine/src/data_source_connections/get_redshift_connection.rs b/apps/api/libs/query_engine/src/data_source_connections/get_redshift_connection.rs index 3ce2d5e8a..9b2828a7a 100644 --- a/apps/api/libs/query_engine/src/data_source_connections/get_redshift_connection.rs +++ b/apps/api/libs/query_engine/src/data_source_connections/get_redshift_connection.rs @@ -16,19 +16,20 @@ pub async fn get_redshift_connection(credentials: &RedshiftCredentials) -> Resul .password(credentials.password.as_str()) .database(&credentials.default_database) .extra_float_digits(2) - .connect_timeout(Duration::from_secs(60)); // 60 second connection timeout + .options([("connect_timeout", "120")]); // 120 second connection timeout let redshift_pool = match PgPoolOptions::new() .max_connections(1) - .acquire_timeout(Duration::from_secs(60)) // 60 second acquire timeout - .connect_timeout(Duration::from_secs(60)) // 60 second pool connection timeout + .acquire_timeout(Duration::from_secs(120)) // 120 second acquire timeout + .idle_timeout(Duration::from_secs(600)) // 10 minute idle timeout + .max_lifetime(Duration::from_secs(3600)) // 1 hour max lifetime .connect_with(options) .await { Ok(redshift_pool) => redshift_pool, Err(e) => { tracing::error!("There was an issue while connecting to Redshift: {}", e); - return Err(anyhow!(e)); + return Err(anyhow!("Failed to connect to Redshift: {}", e)); } };