update so rust build works

This commit is contained in:
dal 2025-07-21 15:46:43 -06:00
parent 64992930a4
commit d1ab09999f
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 5 additions and 4 deletions

View File

@ -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));
}
};