mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
feat(trace): add optional sampling behaviour for routes (#2511)
Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
@ -9,4 +9,5 @@ pub struct Database {
|
||||
pub dbname: String,
|
||||
pub pool_size: u32,
|
||||
pub connection_timeout: u64,
|
||||
pub queue_strategy: bb8::QueueStrategy,
|
||||
}
|
||||
|
||||
@ -88,6 +88,7 @@ pub async fn diesel_make_pg_pool(
|
||||
let manager = async_bb8_diesel::ConnectionManager::<PgConnection>::new(database_url);
|
||||
let mut pool = bb8::Pool::builder()
|
||||
.max_size(database.pool_size)
|
||||
.queue_strategy(database.queue_strategy)
|
||||
.connection_timeout(std::time::Duration::from_secs(database.connection_timeout));
|
||||
|
||||
if test_transaction {
|
||||
|
||||
Reference in New Issue
Block a user