mirror of https://github.com/buster-so/buster.git
update so rust build works
This commit is contained in:
parent
64992930a4
commit
d1ab09999f
|
@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue