File tree Expand file tree Collapse file tree
src/sql/db_connection_pool Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Cargo.lock
1616* .db
1717
1818.vscode /settings.json
19+ .zed /settings.json
1920
2021.DS_Store
2122
Original file line number Diff line number Diff line change @@ -360,7 +360,6 @@ mod test {
360360
361361 use super :: * ;
362362 use crate :: sql:: db_connection_pool:: DbConnectionPool ;
363- use std:: sync:: Arc ;
364363
365364 fn random_db_name ( ) -> String {
366365 let mut rng = rand:: thread_rng ( ) ;
Original file line number Diff line number Diff line change @@ -164,7 +164,14 @@ impl PostgresConnectionPool {
164164 } ;
165165
166166 connection_string. push_str ( format ! ( "sslmode={mode} " ) . as_str ( ) ) ;
167- let config = Config :: from_str ( connection_string. as_str ( ) ) . context ( ConnectionPoolSnafu ) ?;
167+ let mut config =
168+ Config :: from_str ( connection_string. as_str ( ) ) . context ( ConnectionPoolSnafu ) ?;
169+
170+ if let Some ( application_name) = params. get ( "application_name" ) . map ( SecretBox :: expose_secret)
171+ {
172+ config. application_name ( application_name) ;
173+ }
174+
168175 verify_postgres_config ( & config) . await ?;
169176
170177 let mut certs: Option < Vec < Certificate > > = None ;
You can’t perform that action at this time.
0 commit comments