db: set max pool size to 15

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2020-11-22 20:20:21 +05:30
parent 43df413e57
commit 1a5cb0d718
No known key found for this signature in database
GPG Key ID: DD0B4C26654BA8E4

View File

@ -7,7 +7,7 @@ pub type Pool = r2d2::Pool<ConnectionManager<PgConnection>>;
pub fn pool() -> Pool {
let manager = ConnectionManager::<PgConnection>::new(database_url());
Pool::new(manager).expect("db pool")
Pool::builder().max_size(15).build(manager).unwrap()
}
fn database_url() -> String {