Commit ba9f6cc1 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Add some options to r2d2 pool

parent 6cc75a88
Pipeline #556 passed with stages
in 8 minutes and 3 seconds
......@@ -46,7 +46,14 @@ fn main() {
let redis_connstring = var("REDIS_CONNSTRING").unwrap_or_else(|_| String::from("redis://localhost"));
let manager = r2d2_redis::RedisConnectionManager::new(&*redis_connstring).unwrap();
let pool = r2d2::Pool::builder()
// At least 1 connection must be active
// Try to get a connection for max 1 second
// Don't log errors directly.
// They can get quite verbose, and we're already catching and
// logging the corresponding results anyways.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment