Skip to content

Commit 9e4fae7

Browse files
committed
Add a min_idle setting to the non-diesel connection too
1 parent 3ac821e commit 9e4fae7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl App {
4949

5050
let db_config = r2d2::Config::builder()
5151
.pool_size(if config.env == ::Env::Production {10} else {1})
52+
.min_idle(if config.env == ::Env::Production {Some(5)} else {None})
5253
.helper_threads(if config.env == ::Env::Production {3} else {1})
5354
.build();
5455
let diesel_db_config = r2d2::Config::builder()

0 commit comments

Comments
 (0)